Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
7 | public function safeUp() |
||
8 | { |
||
9 | $tableOptions = null; |
||
10 | if ($this->db->driverName === 'mysql') { |
||
11 | $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'; |
||
12 | } |
||
13 | |||
14 | $this->createTable('{{%user_profiles_files}}', [ |
||
15 | 'id' => Schema::TYPE_PK, |
||
16 | 'user_id' => Schema::TYPE_INTEGER . " NOT NULL DEFAULT 0", |
||
17 | 'file_id' => Schema::TYPE_INTEGER . " NOT NULL DEFAULT 0", |
||
18 | ], $tableOptions); |
||
19 | |||
20 | $this->createIndex('link', '{{%user_profiles_files}}', 'user_id, file_id'); |
||
21 | } |
||
22 | |||
28 |