Dexie.js: Error: Dexie specification of currently installed DB version is missing (again)

Created on 7 Dec 2015  路  3Comments  路  Source: dfahlander/Dexie.js

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.

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:

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

All 3 comments

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:

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

Clear, thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

acicali picture acicali  路  4Comments

dfahlander picture dfahlander  路  4Comments

asdip138 picture asdip138  路  3Comments

nezcich picture nezcich  路  3Comments

Script47 picture Script47  路  3Comments