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('{{%rom_release}}', [ |
||
20 | 'id' => $this->primaryKey(), |
||
21 | 'version' => $this->string()->notNull()->comment('版本号'), |
||
22 | 'version_code' => $this->string()->null()->comment('版本代号'), |
||
23 | 'is_forced' => $this->boolean()->notNull()->defaultValue(1)->comment('强制更新'), |
||
24 | 'url' => $this->string()->notNull()->comment('下载地址'), |
||
25 | 'md5' => $this->string()->notNull()->defaultValue('')->comment('MD5'), |
||
26 | 'status' => $this->smallInteger(1)->notNull()->defaultValue(0)->comment('状态'), |
||
27 | 'description' => $this->string()->notNull()->comment('发布说明'), |
||
28 | 'created_at' => $this->integer()->notNull()->comment('创建时间'), |
||
29 | 'updated_at' => $this->integer()->notNull()->comment('更新时间'), |
||
30 | ], $tableOptions . ' COMMENT="发布"'); |
||
31 | } |
||
32 | |||
41 |