Reconstruct public CLOB chart samples from historical books

This commit is contained in:
2026-12-03 16:29:55 +08:00
parent d7a77c734d
commit 2a8916e1d9
11 changed files with 223 additions and 85 deletions
+7
View File
@@ -120,6 +120,13 @@ impl Exchange {
if !quotes_ready {
db.execute_batch(include_str!("quote_schema.sql"))?;
}
let history_ready: bool = db.query_row(
"SELECT EXISTS(SELECT 1 FROM sqlite_schema WHERE type='trigger' AND name='chart_market_listed')",
[], |r| r.get(0),
)?;
if !history_ready {
db.execute_batch(include_str!("prices_history/chart_schema.sql"))?;
}
let marks_ready: bool = db.query_row(
"SELECT EXISTS(SELECT 1 FROM sqlite_schema WHERE type='table' AND name='last_asset_trades')",
[], |row| row.get(0),