Retain submission time and instructions for live and terminal orders
This commit is contained in:
@@ -84,6 +84,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 submissions_ready: bool = db.query_row(
|
||||
"SELECT EXISTS(SELECT 1 FROM sqlite_schema WHERE type='table' AND name='order_submissions')",
|
||||
[], |r| r.get(0),
|
||||
)?;
|
||||
if !submissions_ready {
|
||||
db.execute_batch(include_str!("order_submission_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),
|
||||
|
||||
Reference in New Issue
Block a user