修改表结构

This commit is contained in:
JaguarJack
2019-01-17 17:54:45 +08:00
parent 0d40d74935
commit bfc4904379
3 changed files with 46 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ class Rbac extends Migrator
{
$table = $this->table(config('permissions.table.role'), [ 'engine'=>'InnoDB']);
$table->addColumn('name', 'string',['limit' => 50, 'default'=>'','comment'=>'角色名称'])
->addColumn('created_at', 'timestamp', [ 'comment' => '创建时间'])
->addColumn('created_at', 'timestamp', ['default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间'])
->addColumn('updated_at', 'timestamp', [ 'comment' => '更新时间'])
->addIndex(['name'], ['unique' => true])
->create();
@@ -49,7 +49,7 @@ class Rbac extends Migrator
->addColumn('controller', 'string',['limit' => 50, 'default'=>'','comment'=>'控制器名称'])
->addColumn('action', 'string',['limit' => 50, 'default'=>'1','comment'=>'方法名称'])
->addColumn('is_show', 'integer',['limit' => MysqlAdapter::INT_TINY, 'default'=> 1,'comment'=>'1 展示 2 隐藏'])
->addColumn('created_at', 'timestamp', [ 'comment' => '创建时间'])
->addColumn('created_at', 'timestamp', [ 'default' => 'CURRENT_TIMESTAMP','comment' => '创建时间'])
->addColumn('updated_at', 'timestamp', [ 'comment' => '更新时间'])
->addIndex(['name'], ['unique' => true])
->create();