From 5574c0dfb3b90a6bb3d0c3d28fb2e8078fe5de52 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 3 Jul 2020 11:55:27 +1000 Subject: [PATCH] set schema on collection creation --- rslib/src/storage/sqlite.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rslib/src/storage/sqlite.rs b/rslib/src/storage/sqlite.rs index 0252471e3..34d385b13 100644 --- a/rslib/src/storage/sqlite.rs +++ b/rslib/src/storage/sqlite.rs @@ -167,10 +167,12 @@ impl SqliteStorage { if create { db.execute_batch(include_str!("schema11.sql"))?; // start at schema 11, then upgrade below + let crt = v1_creation_date(); db.execute( - "update col set crt=?, ver=?, conf=?", + "update col set crt=?, scm=?, ver=?, conf=?", params![ - v1_creation_date(), + crt, + crt * 1000, SCHEMA_STARTING_VERSION, &schema11_config_as_string() ],