增】加默认值
This commit is contained in:
parent
8a31920b9d
commit
8ba0301d03
@ -37,7 +37,7 @@ class Rbac extends Migrator
|
|||||||
$table = $this->table(config('permissions.table.role'), [ 'engine'=>'InnoDB', 'comment' => '角色表']);
|
$table = $this->table(config('permissions.table.role'), [ 'engine'=>'InnoDB', 'comment' => '角色表']);
|
||||||
$table->addColumn('name', 'string',['limit' => 50, 'default'=>'','comment'=>'角色名称'])
|
$table->addColumn('name', 'string',['limit' => 50, 'default'=>'','comment'=>'角色名称'])
|
||||||
->addColumn('created_at', 'timestamp', ['default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间'])
|
->addColumn('created_at', 'timestamp', ['default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间'])
|
||||||
->addColumn('updated_at', 'timestamp', [ 'comment' => '更新时间'])
|
->addColumn('updated_at', 'timestamp', [ 'default' => null,'comment' => '更新时间'])
|
||||||
->addIndex(['name'], ['unique' => true])
|
->addIndex(['name'], ['unique' => true])
|
||||||
->create();
|
->create();
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ class Rbac extends Migrator
|
|||||||
->addColumn('action', 'string',['limit' => 50, 'default'=>'1','comment'=>'方法名称'])
|
->addColumn('action', 'string',['limit' => 50, 'default'=>'1','comment'=>'方法名称'])
|
||||||
->addColumn('is_show', 'integer',['limit' => MysqlAdapter::INT_TINY, 'default'=> 1,'comment'=>'1 展示 2 隐藏'])
|
->addColumn('is_show', 'integer',['limit' => MysqlAdapter::INT_TINY, 'default'=> 1,'comment'=>'1 展示 2 隐藏'])
|
||||||
->addColumn('created_at', 'timestamp', [ 'default' => 'CURRENT_TIMESTAMP','comment' => '创建时间'])
|
->addColumn('created_at', 'timestamp', [ 'default' => 'CURRENT_TIMESTAMP','comment' => '创建时间'])
|
||||||
->addColumn('updated_at', 'timestamp', [ 'comment' => '更新时间'])
|
->addColumn('updated_at', 'timestamp', ['default' => null, 'comment' => '更新时间'])
|
||||||
->addIndex(['name'], ['unique' => true])
|
->addIndex(['name'], ['unique' => true])
|
||||||
->create();
|
->create();
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class Users extends Migrator
|
|||||||
->addColumn('remember_token', 'string',['limit' => 255, 'default'=>'','comment'=>'记住token'])
|
->addColumn('remember_token', 'string',['limit' => 255, 'default'=>'','comment'=>'记住token'])
|
||||||
->addColumn('login_ip', 'string',['limit' => 50, 'default'=>'','comment'=>'登录IP'])
|
->addColumn('login_ip', 'string',['limit' => 50, 'default'=>'','comment'=>'登录IP'])
|
||||||
->addColumn('created_at', 'timestamp', ['default' => 'CURRENT_TIMESTAMP', 'comment' => '更新时间'])
|
->addColumn('created_at', 'timestamp', ['default' => 'CURRENT_TIMESTAMP', 'comment' => '更新时间'])
|
||||||
->addColumn('login_at', 'timestamp', [ 'comment' => '最近登录时间'])
|
->addColumn('login_at', 'timestamp', [ 'default' => null, 'comment' => '最近登录时间'])
|
||||||
->addIndex(['name', 'email'], ['unique' => true])
|
->addIndex(['name', 'email'], ['unique' => true])
|
||||||
->create();
|
->create();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user