Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function up() |
||
14 | { |
||
15 | $tableOptions = null; |
||
16 | if ($this->db->driverName === 'mysql') { |
||
17 | $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'; |
||
18 | } |
||
19 | $this->createTable('{{%lookup}}', [ |
||
20 | 'id' => $this->primaryKey(), |
||
21 | 'type' => $this->string(100)->notNull(), |
||
22 | 'name' => $this->string(100)->notNull(), |
||
23 | 'code' => $this->integer()->defaultValue(1)->notNull(), |
||
24 | 'comment' => $this->text(), |
||
25 | 'active' => $this->boolean()->defaultValue(1), |
||
26 | 'order' => $this->integer()->defaultValue(1)->notNull(), |
||
27 | 'created_at' => $this->integer()->defaultValue(null)->notNull(), |
||
28 | 'updated_at' => $this->integer()->defaultValue(null) |
||
29 | ], $tableOptions); |
||
30 | $this->createIndex('lookup_type_name', '{{%lookup}}', ['type', 'name']); |
||
31 | } |
||
32 | |||
41 |