From 3580f895524610baa5b996ac29a820a904c01379 Mon Sep 17 00:00:00 2001 From: wangfq Date: Thu, 11 Jun 2026 17:21:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20role=20COMMENT=20=E5=A2=9E=E5=8A=A0=20a?= =?UTF-8?q?nalyst=20=E8=A7=92=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models.py b/src/models.py index 4e0e7aa..d96dacd 100644 --- a/src/models.py +++ b/src/models.py @@ -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