菜鸟鼻涕
- 菜鸟鼻涕 赞了说说Quitters never win and winners never quit.
- 菜鸟鼻涕 发表了说说Quitters never win and winners never quit.
- 菜鸟鼻涕 赞了回答
用
public function safeDown() { $this->dropTable('{{%tableName}}'); }
删除掉,再migrate/create一个
safeUp方法如下public function safeUp() { $this->createTable('{{%tableName}}', [ 'id' => $this->primaryKey(), 'title' => $this->string(100)->defaultValue('')->notNull()->comment('公告标题'), 'content' => $this->text()->comment('公告内容'), 'lang' => $this->string('20')->comment('标题语言'), 'create_at' => $this->timestamp()->comment('创建时间'), 'update_at' => $this->timestamp()->comment('更新时间'), 'close_at' => $this->timestamp()->comment('结束时间'), ], 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'); } }
- 菜鸟鼻涕 回答了问题 Migrations 能修改数据表的引擎吗?
用
public function safeDown() { $this->dropTable('{{%tableName}}'); }
删除掉,再migrate/create一个
safeUp方法如下public function safeUp() { $this->createTable('{{%tableName}}', [ 'id' => $this->primaryKey(), 'title' => $this->string(100)->defaultValue('')->notNull()->comment('公告标题'), 'content' => $this->text()->comment('公告内容'), 'lang' => $this->string('20')->comment('标题语言'), 'create_at' => $this->timestamp()->comment('创建时间'), 'update_at' => $this->timestamp()->comment('更新时间'), 'close_at' => $this->timestamp()->comment('结束时间'), ], 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'); } }
- 菜鸟鼻涕 赞了说说人生应该如蜡烛一样,从顶燃到底,一直都是光明的。
- 菜鸟鼻涕 2018-06-27 已签到连续签到9天,获得了20个金钱
- 菜鸟鼻涕 赞了说说可以发表情包啦!
- 菜鸟鼻涕 2018-06-26 已签到连续签到8天,获得了20个金钱