Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Dexie specification of currently installed DB version is missing (again) #156

Closed
ibc opened this issue Dec 7, 2015 · 3 comments
Closed

Comments

@ibc
Copy link

ibc commented Dec 7, 2015

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.

@ibc
Copy link
Author

ibc commented Dec 7, 2015

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...

@dfahlander
Copy link
Collaborator

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:

  • Changes to schemas should be new versions of the schema, don't change the existing one.
  • Keep all schema versions that have been published (that may exist out there...)

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.

@ibc
Copy link
Author

ibc commented Dec 7, 2015

Clear, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants