set schema on collection creation

This commit is contained in:
Damien Elmes 2020-07-03 11:55:27 +10:00
parent 4033f00988
commit 5574c0dfb3

View file

@ -167,10 +167,12 @@ impl SqliteStorage {
if create { if create {
db.execute_batch(include_str!("schema11.sql"))?; db.execute_batch(include_str!("schema11.sql"))?;
// start at schema 11, then upgrade below // start at schema 11, then upgrade below
let crt = v1_creation_date();
db.execute( db.execute(
"update col set crt=?, ver=?, conf=?", "update col set crt=?, scm=?, ver=?, conf=?",
params![ params![
v1_creation_date(), crt,
crt * 1000,
SCHEMA_STARTING_VERSION, SCHEMA_STARTING_VERSION,
&schema11_config_as_string() &schema11_config_as_string()
], ],