refactor: 修改各表user_agent字段长度

This commit is contained in:
2025-06-30 15:17:09 +08:00
parent 02e81d3e59
commit 115df47fe6
3 changed files with 3 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ class CreateArticleLeaveMessage extends Migrator
->addColumn('email', 'string', ['limit' => 128, 'null' => false, 'comment' => '邮箱']) ->addColumn('email', 'string', ['limit' => 128, 'null' => false, 'comment' => '邮箱'])
->addColumn('content', 'text', ['null' => false, 'comment' => '内容']) ->addColumn('content', 'text', ['null' => false, 'comment' => '内容'])
->addColumn('ip', 'string', ['limit' => 64, 'null' => false, 'comment' => 'IP']) ->addColumn('ip', 'string', ['limit' => 64, 'null' => false, 'comment' => 'IP'])
->addColumn('user_agent', 'string', ['limit' => 255, 'null' => false, 'comment' => 'UserAgent']) ->addColumn('user_agent', 'string', ['limit' => 1024, 'null' => false, 'comment' => 'UserAgent'])
->addColumn('is_audited', 'boolean', ['null' => false, 'default' => 0, 'comment' => '0待审核,1已审核']) ->addColumn('is_audited', 'boolean', ['null' => false, 'default' => 0, 'comment' => '0待审核,1已审核'])
->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间']) ->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间'])
->addColumn('deleted_at', 'timestamp', ['null' => true, 'comment' => '删除时间']) ->addColumn('deleted_at', 'timestamp', ['null' => true, 'comment' => '删除时间'])

View File

@@ -33,7 +33,7 @@ class CreateLeaveMessage extends Migrator
->addColumn('email', 'string', ['limit' => 128, 'null' => false, 'comment' => '邮箱']) ->addColumn('email', 'string', ['limit' => 128, 'null' => false, 'comment' => '邮箱'])
->addColumn('content', 'text', ['null' => false, 'comment' => '内容']) ->addColumn('content', 'text', ['null' => false, 'comment' => '内容'])
->addColumn('ip', 'string', ['limit' => 64, 'null' => false, 'comment' => 'IP']) ->addColumn('ip', 'string', ['limit' => 64, 'null' => false, 'comment' => 'IP'])
->addColumn('user_agent', 'string', ['limit' => 255, 'null' => false, 'comment' => 'UserAgent']) ->addColumn('user_agent', 'string', ['limit' => 1024, 'null' => false, 'comment' => 'UserAgent'])
->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间']) ->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间'])
->create(); ->create();
} }

View File

@@ -31,7 +31,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' => 11, 'signed' => false, 'null' => false, 'comment' => '登录IP']) ->addColumn('ip', 'integer', ['limit' => 11, 'signed' => false, 'null' => false, 'comment' => '登录IP'])
->addColumn('user_agent', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '登录设备UA信息']) ->addColumn('user_agent', 'string', ['limit' => 1024, 'null' => true, 'default' => null, 'comment' => '登录设备UA信息'])
->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间']) ->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间'])
->create(); ->create();
} }