继续尝试修复环境变量问题
This commit is contained in:
@@ -820,7 +820,9 @@ def init_database():
|
||||
# 执行 DDL
|
||||
conn = get_pg_connection()
|
||||
try:
|
||||
with open("schema.sql", "r", encoding="utf-8") as f:
|
||||
import os as _os
|
||||
schema_path = _os.path.join(_os.path.dirname(_os.path.abspath(__file__)), "schema.sql")
|
||||
with open(schema_path, "r", encoding="utf-8") as f:
|
||||
ddl_sql = f.read()
|
||||
|
||||
# 按分号分割,逐条执行 (忽略被注释掉的分区表DDL)
|
||||
|
||||
Reference in New Issue
Block a user