refactor: 修改sys_user表email字段可空

This commit is contained in:
2024-12-31 15:32:37 +08:00
parent 1397759044
commit 741c2d6f85

View File

@@ -35,7 +35,7 @@ class CreateSysUser extends Migrator
->addColumn('nickname', 'string', ['limit' => 64, 'null' => false, 'comment' => '昵称']) ->addColumn('nickname', 'string', ['limit' => 64, 'null' => false, 'comment' => '昵称'])
->addColumn('avatar', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '头像']) ->addColumn('avatar', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '头像'])
->addColumn('mobile', 'biginteger', ['limit' => 11, 'null' => true, 'default' => null, 'comment' => '手机号码']) ->addColumn('mobile', 'biginteger', ['limit' => 11, 'null' => true, 'default' => null, 'comment' => '手机号码'])
->addColumn('email', 'string', ['limit' => 128, 'null' => false, 'comment' => '邮箱地址']) ->addColumn('email', 'string', ['limit' => 128, 'null' => true, 'default' => null, 'comment' => '邮箱地址'])
->addColumn('status', 'boolean', ['null' => false, 'default' => 1, 'comment' => '-1为禁用, 1为启用']) ->addColumn('status', 'boolean', ['null' => false, 'default' => 1, 'comment' => '-1为禁用, 1为启用'])
->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间']) ->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间'])
->addColumn('updated_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', 'comment' => '更新时间']) ->addColumn('updated_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', 'comment' => '更新时间'])