Conditions | 2 |
Paths | 2 |
Total Lines | 25 |
Code Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
8 | public function safeUp() |
||
9 | { |
||
10 | $tableOptions = null; |
||
11 | if ($this->db->driverName === 'mysql') { |
||
12 | $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; |
||
13 | } |
||
14 | |||
15 | $this->createTable( |
||
16 | '{{%file}}', |
||
17 | [ |
||
18 | 'id' => $this->primaryKey(11), |
||
19 | 'class' => $this->string(255)->notNull(), |
||
20 | 'field' => $this->string(255)->notNull(), |
||
21 | 'object_id' => $this->integer(11)->notNull()->defaultValue(0), |
||
22 | 'title' => $this->string(255)->notNull(), |
||
23 | 'filename' => $this->string(255)->notNull(), |
||
24 | 'content_type' => $this->string(255)->notNull(), |
||
25 | 'type' => $this->integer(1)->notNull(), |
||
26 | 'video_status' => $this->integer(1)->null()->defaultValue(null), |
||
27 | 'ordering' => $this->integer(11)->notNull()->defaultValue(0), |
||
28 | 'created' => $this->integer(11)->notNull(), |
||
29 | 'user_id' => $this->integer(11)->null(), |
||
30 | 'size' => $this->integer(20)->notNull(), |
||
31 | 'hash' => $this->string(255)->null(), |
||
32 | ], $tableOptions |
||
33 | ); |
||
42 |