finish API development

This commit is contained in:
Liujian committed 2025-07-29 18:40:38 +08:00
1 parent a224445038
commit ec96465a96
22 files changed
+80 -50

No files matched your search

-2
View File
@@ -25,7 +25,6 @@ def execute_sql_file(file_path: str, db_config: Optional[DBConfig] = None) -> No
"""
if db_config is None:
db_config = DBConfig()
print(db_config.MYSQL_HOST, db_config.MYSQL_PORT, db_config.MYSQL_USER, db_config.MYSQL_PASSWORD, db_config.MYSQL_DB)
# 连接数据库
conn = mysql.connector.connect(
host=db_config.MYSQL_HOST,
@@ -80,7 +79,6 @@ def main():
sql_paths = [
project_root / 'sql' / 'init.sql'
]
print(sql_paths)
sql_file = next((path for path in sql_paths if path.exists()), None)
if not sql_file:
print("错误: 未找到 init.sql 文件")