db->driverName === 'mysql') { $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="rabbit log"'; } $this->createTable('{{%rabbit_log}}', [ //'name'=>Schema::TYPE_STRING.'(200) PRIMARY KEY NOT NULL', 'id'=>Schema::TYPE_PK, 'channel'=>Schema::TYPE_TEXT.' NULL COMMENT "频道"', 'queue'=>Schema::TYPE_TEXT.' NULL COMMENT "队列"', 'msg'=>Schema::TYPE_TEXT.' NULL COMMENT "发送的所有信息"', 'msg_body'=>Schema::TYPE_TEXT.' NULL COMMENT "信息体"', 'msg_delivery_tag'=>Schema::TYPE_TEXT.' NULL COMMENT "路由标签"', 'addtime'=>Schema::TYPE_DATETIME.' NULL COMMENT "操作时间"', 'describe'=>Schema::TYPE_TEXT.' NULL COMMENT "备注"', ], $tableOptions); } /* // Use up()/down() to run migration code without a transaction. public function up() { } public function down() { echo "m180112_145718_rabbit_log cannot be reverted.\n"; return false; } */ }