feat: add reporting workflow and optimize dashboard loading
This commit is contained in:
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user