feat: add reporting workflow and optimize dashboard loading

This commit is contained in:
wanghep
2026-04-18 14:46:24 +08:00
parent d661b801df
commit 8c9117ca4c
18 changed files with 834 additions and 83 deletions

View File

@ -59,6 +59,15 @@ def apply_incremental_alters(config: AppConfig) -> None:
cursor.execute(
"ALTER TABLE lhb_detail_seats ADD UNIQUE KEY uniq_lhb_detail_record (trade_date, stock_code, rid, table_title, seat_name)"
)
if not _index_exists(cursor, schema_name, "lhb_detail_seats", "idx_lhb_detail_trader_stock_date"):
cursor.execute(
"ALTER TABLE lhb_detail_seats ADD KEY idx_lhb_detail_trader_stock_date (matched_trader_name, stock_code, trade_date)"
)
if not _index_exists(cursor, schema_name, "warning_events", "idx_warning_events_trader_type_date_code"):
cursor.execute(
"ALTER TABLE warning_events ADD KEY idx_warning_events_trader_type_date_code (trader_name, warning_type, trade_date, stock_code)"
)
def main() -> None: