增加表注释
This commit is contained in:
parent
b6ce13c00e
commit
a17f53f967
@ -34,14 +34,14 @@ class Rbac extends Migrator
|
||||
|
||||
public function up()
|
||||
{
|
||||
$table = $this->table(config('permissions.table.role'), [ 'engine'=>'InnoDB']);
|
||||
$table = $this->table(config('permissions.table.role'), [ 'engine'=>'InnoDB', 'comment' => '角色表']);
|
||||
$table->addColumn('name', 'string',['limit' => 50, 'default'=>'','comment'=>'角色名称'])
|
||||
->addColumn('created_at', 'timestamp', ['default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间'])
|
||||
->addColumn('updated_at', 'timestamp', [ 'comment' => '更新时间'])
|
||||
->addIndex(['name'], ['unique' => true])
|
||||
->create();
|
||||
|
||||
$table = $this->table(config('permissions.table.permission'), ['engine' => 'InnoDB']);
|
||||
$table = $this->table(config('permissions.table.permission'), ['engine' => 'InnoDB', 'comment' => '权限菜单']);
|
||||
$table->addColumn('name', 'string',['limit' => 50, 'default'=>'','comment'=>'菜单名称'])
|
||||
->addColumn('icon', 'string', ['limit' => 50, 'default'=>'', 'comment'=>'菜单图标'])
|
||||
->addColumn('pid', 'integer', ['limit' => MysqlAdapter::INT_SMALL, 'comment'=>'父级菜单ID'])
|
||||
@ -54,12 +54,12 @@ class Rbac extends Migrator
|
||||
->addIndex(['name'], ['unique' => true])
|
||||
->create();
|
||||
|
||||
$table = $this->table(config('permissions.table.user_has_roles'), ['engine' => 'InnoDB', 'identity' => true]);
|
||||
$table = $this->table(config('permissions.table.user_has_roles'), ['engine' => 'InnoDB', 'identity' => true, 'comment' => '用户角色关联']);
|
||||
$table->addColumn('uid', 'integer',['limit' => 11, 'comment'=>'用户ID'])
|
||||
->addColumn('role_id', 'integer', [ 'comment' => '角色ID'])
|
||||
->create();
|
||||
|
||||
$table = $this->table(config('permissions.table.role_has_permissions'), ['engine' => 'InnoDB', 'identity' => true]);
|
||||
$table = $this->table(config('permissions.table.role_has_permissions'), ['engine' => 'InnoDB', 'identity' => true, 'comment' => '角色权限关联']);
|
||||
$table->addColumn('role_id', 'integer',['limit' => 11, 'comment'=>'角色ID'])
|
||||
->addColumn('permission_id', 'integer', [ 'comment' => '权限ID'])
|
||||
->create();
|
||||
|
@ -28,7 +28,7 @@ class Users extends Migrator
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('users', ['engine' => 'InnoDB']);
|
||||
$table = $this->table('users', ['engine' => 'InnoDB', 'comment' => '用户表']);
|
||||
$table->addColumn('name', 'string',['limit' => 50, 'default'=>'','comment'=>'用户名'])
|
||||
->addColumn('email', 'string',['limit' => 255, 'default'=>'','comment'=>'邮箱'])
|
||||
->addColumn('password', 'string',['limit' => 255, 'default'=>'','comment'=>'密码'])
|
||||
|
@ -30,7 +30,7 @@ class Log extends Migrator
|
||||
public function change()
|
||||
{
|
||||
|
||||
$table = $this->table('option_log', ['engine' => 'InnoDB']);
|
||||
$table = $this->table('option_log', ['engine' => 'InnoDB', 'comment' => '操作日志表']);
|
||||
$table->addColumn('user_name', 'string',['limit' => 50, 'default'=>'','comment'=>'用户名'])
|
||||
->addColumn('user_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR, 'comment' => '用户ID'])
|
||||
->addColumn('module', 'string',['limit' => 20, 'default'=>'','comment'=>'模块'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user