Compare commits
1 Commits
25aafd57c8
...
3580f89552
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3580f89552 |
@@ -152,7 +152,7 @@ async def _create_tables(pool: aiomysql.Pool):
|
||||
`id` INT AUTO_INCREMENT PRIMARY KEY,
|
||||
`username` VARCHAR(45) UNIQUE NOT NULL,
|
||||
`password_hash` VARCHAR(256) NOT NULL,
|
||||
`role` VARCHAR(20) DEFAULT 'operator' COMMENT 'admin/manager/operator',
|
||||
`role` VARCHAR(20) DEFAULT 'operator' COMMENT 'admin/manager/operator/analyst',
|
||||
`is_active` TINYINT DEFAULT 1,
|
||||
`create_time` DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
|
||||
@@ -348,7 +348,7 @@ async def _create_tables(pool: aiomysql.Pool):
|
||||
try:
|
||||
await cur.execute(
|
||||
"ALTER TABLE tb_user MODIFY COLUMN `role` VARCHAR(20) DEFAULT 'operator' "
|
||||
"COMMENT 'admin/manager/operator'"
|
||||
"COMMENT 'admin/manager/operator/analyst'"
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user