refactor: 更新用户登日志表迁移文件

This commit is contained in:
2025-01-20 11:45:33 +08:00
parent cdcc7f8d69
commit 568306bb6e

View File

@@ -30,7 +30,7 @@ class CreateSysUserLoginLog extends Migrator
{ {
$table = $this->table('sys_user_login_log', ['engine' => 'MyISAM', 'comment' => '系统用户登录日志表']); $table = $this->table('sys_user_login_log', ['engine' => 'MyISAM', 'comment' => '系统用户登录日志表']);
$table->addColumn('user_id', 'integer', ['null' => false, 'comment' => '用户ID']) $table->addColumn('user_id', 'integer', ['null' => false, 'comment' => '用户ID'])
->addColumn('ip', 'integer', ['limit' => 10, 'null' => false, 'comment' => '登录IP']) ->addColumn('ip', 'integer', ['limit' => 11, 'signed' => false, 'null' => false, 'comment' => '登录IP'])
->addColumn('user_agent', 'string', ['limit' => 255, 'null' => false, 'comment' => '登录设备UA信息']) ->addColumn('user_agent', 'string', ['limit' => 255, 'null' => false, 'comment' => '登录设备UA信息'])
->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间']) ->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间'])
->create(); ->create();