v1.7.1: fix bot_test.html theme (localStorage key + css vars + scrollbar), mock MAX API for test users
This commit is contained in:
+3
-3
@@ -99,6 +99,8 @@ async def _add_column_if_not_exists(conn, table: str, column: str, col_type: str
|
||||
END IF;
|
||||
END $$;
|
||||
"""))
|
||||
except Exception as e:
|
||||
logger.warning(f"Migration add column {table}.{column}: {e}")
|
||||
|
||||
|
||||
def _validate_sql_name(name: str) -> None:
|
||||
@@ -109,11 +111,9 @@ def _validate_sql_name(name: str) -> None:
|
||||
|
||||
def _validate_sql_type(col_type: str) -> None:
|
||||
import re
|
||||
allowed = r'^(VARCHAR\(\d+\)|TEXT|INTEGER|BOOLEAN( DEFAULT (TRUE|FALSE))?|TIMESTAMP)$'
|
||||
allowed = r'^(VARCHAR\(\d+\)|TEXT|INTEGER( DEFAULT \d+)?|BOOLEAN( DEFAULT (TRUE|FALSE))?|TIMESTAMP)$'
|
||||
if not re.match(allowed, col_type.strip()):
|
||||
raise ValueError(f"Invalid SQL type: {col_type}")
|
||||
except Exception as e:
|
||||
logger.warning(f"Migration add column {table}.{column}: {e}")
|
||||
|
||||
|
||||
async def _seed_default_settings():
|
||||
|
||||
Reference in New Issue
Block a user