| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 | <?phpuse yii\db\Migration;use yii\db\Schema;/** * Handles the creation of table `{{%interview}}`. */class m181105_191112_create_interview_table extends Migration{    public $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=InnoDB';    /**     * @inheritdoc     */    public function up()    {        /**         * 大师         */        $this->createTable('{{%interview}}', [            'id' => Schema::TYPE_PK,            'compere_id' => Schema::TYPE_INTEGER . "(11) NOT NULL COMMENT '主持人'",            'master_id' => Schema::TYPE_INTEGER . "(11) NOT NULL COMMENT '大师'",            'title' => Schema::TYPE_STRING . "(20) NOT NULL  COMMENT '标题'",            'desc' => Schema::TYPE_STRING . "(300) NOT NULL  COMMENT '开场白'",            'province' => Schema::TYPE_STRING . "(50) NOT NULL  COMMENT '省份'",            'city' => Schema::TYPE_STRING . "(50) NOT NULL  COMMENT '城市'",            'area' => Schema::TYPE_STRING . "(50) NOT NULL  COMMENT '区域'",            'address' => Schema::TYPE_STRING . "(200) NOT NULL  COMMENT '详细地址'",            'vid' => Schema::TYPE_STRING . "(32) NOT NULL  COMMENT '腾讯视频vid'",            '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}}');    }}
 |