I've checked #16 but could not find any solution in there.
Basically I've changed some table definition (stores) and cleared browser data for my domain (currently localhost). Then when running again my app db.load() fails with:
Error: Dexie specification of currently installed DB version is missing
I've also tried to change db.version(2) but nothing changes.
I'm 100% lost. Do I miss something?
Thanks a lot.
NOTE: I've cleared browser domain data and restarted the browser (Chrome) and now it works.
I'm a bit afraid of some users of the app will suffer the same issue when they load the new version of the website...
Whenever you add a store or index to your schema, you must do that in another version, but keep the old version schema as long as there are users out there with the old version installed.
So basically, you would need to define both version(1) and version(2). This is explained in Design#database-versioning.
To sum it up:
Note: Dexie will provide the migration in backround in case a user with version 1 installed loads your version 2-app, but it would need to know the structure (how it looked like) in version 1 in order to do that.
Clear, thanks a lot!
Most helpful comment
Whenever you add a store or index to your schema, you must do that in another version, but keep the old version schema as long as there are users out there with the old version installed.
So basically, you would need to define both version(1) and version(2). This is explained in Design#database-versioning.
To sum it up:
Note: Dexie will provide the migration in backround in case a user with version 1 installed loads your version 2-app, but it would need to know the structure (how it looked like) in version 1 in order to do that.