We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
迁移的时候报错"extra" is not a valid column option. 应该怎么办?
"extra" is not a valid column option.
class Contact extends Migrator { public function change() { $table = $this->table('contact'); $table->addColumn('user_id', 'integer', ['comment' => '用户 ID']) ->addColumn('contact_id', 'integer', ['comment' => '联系人 ID']) ->addColumn('type', 'enum', ['values' => ['normal', 'blocked'], 'default' => 'normal', 'comment' => '关系类型']) ->addColumn('created_at', 'datetime', array('null' => true, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间')) ->addColumn('updated_at', 'datetime', array('null' => true, 'default' => 'CURRENT_TIMESTAMP', 'extra' => 'ON UPDATE CURRENT_TIMESTAMP', 'comment' => '更新时间')) ->create(); } public function down() { $this->dropTable('contact'); } }
The text was updated successfully, but these errors were encountered:
'extra' => 'ON UPDATE CURRENT_TIMESTAMP', 删除
Sorry, something went wrong.
No branches or pull requests
迁移的时候报错
"extra" is not a valid column option.
应该怎么办?The text was updated successfully, but these errors were encountered: