Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 13 |
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('{{%app}}', [ |
||
20 | 'id' => $this->primaryKey(), |
||
21 | 'app_name' => $this->string(32)->notNull()->comment('App名称'), |
||
22 | 'app_description' => $this->string(125)->notNull()->defaultValue('')->comment('App简介'), |
||
23 | 'app_key' => $this->char(36)->notNull()->comment('App Key'), |
||
24 | 'app_secret' => $this->char(32)->notNull()->comment('App Secret'), |
||
25 | 'created_at' => $this->integer()->notNull()->comment('创建时间'), |
||
26 | 'updated_at' => $this->integer()->notNull()->comment('更新时间'), |
||
27 | 'status' => $this->boolean()->notNull()->defaultValue(1)->comment('状态'), |
||
28 | ], $tableOptions); |
||
29 | } |
||
39 |