Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public function safeUp() |
||
14 | { |
||
15 | $this->createTable('{{%category}}', [ |
||
16 | 'id' => $this->primaryKey(), |
||
17 | 'user_id' => $this->integer()->notNull(), |
||
18 | 'direction' => $this->tinyInteger()->notNull(), |
||
19 | 'name' => $this->string(120)->notNull(), |
||
20 | 'color' => $this->string(7)->notNull(), |
||
21 | 'icon_name' => $this->string(120)->notNull(), |
||
22 | 'status' => $this->tinyInteger()->defaultValue(1), |
||
23 | 'created_at' => $this->timestamp()->defaultValue(null), |
||
24 | 'updated_at' => $this->timestamp()->defaultValue(null), |
||
25 | ]); |
||
26 | |||
27 | $this->createIndex('category_user_id', '{{%category}}', 'user_id'); |
||
28 | } |
||
38 |