Fix PostgreSQL schema init: commit DDL before ALTER migrations.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-01 08:15:31 +08:00
parent 008f042fcc
commit 2347276bf4
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -149,6 +149,7 @@ def init_strategy_tables(conn) -> None:
CTP_SIM_POSITIONS_SQL,
):
conn.execute(sql)
conn.commit()
try:
conn.execute("ALTER TABLE trend_pullback_plans ADD COLUMN period TEXT DEFAULT '15m'")
except Exception: