mirror of
https://github.com/zaphar/kitchen.git
synced 2025-07-21 19:29:49 -04:00
fix: cannot have database at version 0
This commit is contained in:
parent
b93edd2701
commit
f75652befa
@ -100,7 +100,7 @@ const APP_STATE_KEY: &'static str = "app-state";
|
||||
impl LocalStore {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
store: DBFactory::new("app-state", Some(0)),
|
||||
store: DBFactory::new("app-state", Some(1)),
|
||||
//old_store: js_lib::get_storage(),
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ impl<'name> DBFactory<'name> {
|
||||
// database with an older version than the one we requested to build.
|
||||
let db = evt.database();
|
||||
// NOTE(jwall): This needs to be somewhat clever in handling version upgrades.
|
||||
if db.version() == 0 {
|
||||
if db.version() == 1 {
|
||||
// We use out of line keys for this object store
|
||||
db.build_object_store(STORE_NAME).create()?;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user