You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Request
Available Version.upgrade could be run when using importInto.
Use Case
I am using Dexie export to let my users locally save and share their work. After a model upgrade, a run into the issue of version incompatibility.
Dexie has a very nice version upgrade feature that I have been happily leveraging when creating my database from indexedDB, unfortunately it won't work when using importInto.
Current Workaround
asyncfunctionimport(file: File){// Completely delete the current data base. Import should overwrite// everything anyway.awaitdb.delete();// Export file may be outdated. For this reason, we cannot use// importInto. Instead, we import the new database in a new (default)// Dexie instance to save the potentially outdated data in instance db.letnewDb=awaitimportDB(file);awaitnewDb.close();// Recreate the database using our custom database class. This// will trigger the version upgrade if needed.db=newDatabase();awaitdb.open();}
The text was updated successfully, but these errors were encountered:
Feature Request
Available
Version.upgrade
could be run when usingimportInto
.Use Case
I am using Dexie export to let my users locally save and share their work. After a model upgrade, a run into the issue of version incompatibility.
Dexie has a very nice version upgrade feature that I have been happily leveraging when creating my database from indexedDB, unfortunately it won't work when using
importInto
.Current Workaround
The text was updated successfully, but these errors were encountered: