Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
13 | public function up() |
||
14 | { |
||
15 | $tableOptions = null; |
||
16 | |||
17 | if ($this->db->driverName === 'mysql') { |
||
18 | $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; |
||
19 | } |
||
20 | |||
21 | $this->createTable('{{%Setting}}', [ |
||
22 | 'id' => $this->primaryKey(), |
||
23 | 'type' => $this->string(10)->notNull(), |
||
24 | 'section' => $this->string()->notNull(), |
||
25 | 'key' => $this->string()->notNull(), |
||
26 | 'value' => $this->text()->notNull(), |
||
27 | 'status' => $this->smallInteger()->notNull()->defaultValue(1), |
||
28 | 'createdAt' => $this->integer()->notNull(), |
||
29 | 'updatedAt' => $this->integer()->notNull(), |
||
30 | ], $tableOptions); |
||
31 | } |
||
41 |