12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- use yii\db\Migration;
- use yii\db\Schema;
- /**
- * Handles the creation of table `{{%interview_log}}`.
- */
- class m181105_193515_create_interview_log_table extends Migration
- {
- public $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=InnoDB';
- /**
- * @inheritdoc
- */
- public function up()
- {
- /**
- * 大师
- */
- $this->createTable('{{%interview_log}}', [
- 'id' => Schema::TYPE_PK,
- 'interview_id' => Schema::TYPE_INTEGER . "(11) NOT NULL COMMENT '访谈ID'",
- 'type' => Schema::TYPE_SMALLINT . "(1) NOT NULL COMMENT '类型'",
- 'content' => Schema::TYPE_STRING . "(500) NOT NULL COMMENT '内容'",
- 'created_at' => Schema::TYPE_INTEGER . "(11) NOT NULL",
- 'updated_at' => Schema::TYPE_INTEGER . "(11) NOT NULL",
- 'status' => Schema::TYPE_SMALLINT . "(1) NOT NULL DEFAULT '1' COMMENT '状态'",
- ], $this->tableOptions);
- }
- /**
- * @inheritdoc
- */
- public function down()
- {
- $this->dropTable('{{%interview_log}}');
- }
- }
|