-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path004_delete_task_settings.php
More file actions
82 lines (76 loc) · 3.31 KB
/
004_delete_task_settings.php
File metadata and controls
82 lines (76 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
/**
* DeleteTaskSettings migration
*
* @author Yuto Kitatsuji <kitatsuji.yuto@withone.co.jp>
* @link http://www.netcommons.org NetCommons Project
* @license http://www.netcommons.org/license.txt NetCommons License
* @copyright Copyright 2014, NetCommons Project
*/
App::uses('NetCommonsMigration', 'NetCommons.Config/Migration');
/**
* DeleteTaskSettings migration
*
* @author Yuto Kitatsuji <kitatsuji.yuto@withone.co.jp>
* @package NetCommons\Tasks\Config\Migration
*/
class DeleteTaskSettings extends CakeMigration {
/**
* Migration description
*
* @var string
*/
public $description = 'delete_task_settings';
/**
* Actions to be performed
*
* @var array $migration
*/
public $migration = array(
'up' => array(
'drop_table' => array(
'task_settings'
),
),
'down' => array(
'create_table' => array(
'task_settings' => array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary', 'comment' => 'ID'),
'task_key' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'Task key | BLOGキー | Hash値 | ', 'charset' => 'utf8'),
'use_workflow' => array('type' => 'boolean', 'null' => false, 'default' => '1', 'comment' => 'Use workflow, 0:Unused 1:Use | コンテンツの承認機能 0:使わない 1:使う | | '),
'use_comment' => array('type' => 'boolean', 'null' => false, 'default' => '1', 'comment' => 'Use of comments, 0:Unused 1:Use | コメント機能 0:使わない 1:使う | | '),
'use_comment_approval' => array('type' => 'boolean', 'null' => false, 'default' => '1', 'comment' => 'Use of comments approval, 0:Unused 1:Use | コメントの承認機能 0:使わない 1:使う | | '),
'use_like' => array('type' => 'boolean', 'null' => false, 'default' => '1', 'comment' => 'Use of like button, 0:Unused 1:Use | 高い評価ボタンの使用 0:使わない 1:使う | | '),
'use_unlike' => array('type' => 'boolean', 'null' => false, 'default' => '1', 'comment' => 'Use of unlike button, 0:Unused 1:Use | 低い評価ボタンの使用 0:使わない 1:使う | | '),
'use_sns' => array('type' => 'boolean', 'null' => false, 'default' => '1'),
'created_user' => array('type' => 'integer', 'null' => true, 'default' => '0', 'unsigned' => false, 'comment' => '作成者'),
'created' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '作成日時'),
'modified_user' => array('type' => 'integer', 'null' => true, 'default' => '0', 'unsigned' => false, 'comment' => '更新者'),
'modified' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '更新日時'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB'),
),
),
),
);
/**
* Before migration callback
*
* @param string $direction Direction of migration process (up or down)
* @return bool Should process continue
*/
public function before($direction) {
return true;
}
/**
* After migration callback
*
* @param string $direction Direction of migration process (up or down)
* @return bool Should process continue
*/
public function after($direction) {
return true;
}
}