Filter market clarifications by durable event directory IDs

This commit is contained in:
2026-12-03 11:28:10 +08:00
parent 3495e8de3c
commit 9cbcc03681
9 changed files with 149 additions and 18 deletions
+7
View File
@@ -76,6 +76,13 @@ impl Exchange {
db.busy_timeout(Duration::from_secs(10))?;
db.execute_batch("PRAGMA foreign_keys=ON")?;
db.execute_batch(include_str!("schema.sql"))?;
let directory_ready: bool = db.query_row(
"SELECT EXISTS(SELECT 1 FROM sqlite_schema WHERE type='table' AND name='event_directory_ids')",
[], |row| row.get(0),
)?;
if !directory_ready {
db.execute_batch(include_str!("event_directory_schema.sql"))?;
}
let kickoff_ready: bool = db.query_row(
"SELECT EXISTS(SELECT 1 FROM sqlite_schema WHERE type='table' AND name='sports_kickoffs')",
[], |r| r.get(0),