importDB and importInto #2063
-
Hello, I used I just found this thread and it helped me tackle the situation. But I can't tell how it works and the difference between Does
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
There is no upgrading support built into dexie-export-import. It's just that if you use importDB it will create a database with the same version as it was when it was exported. Opening it again using a declared Dexie instance with a higher version and upgraders declared, these upgraders will run into the data. In your case, you have already existing data and you want to keep it and just merge the import into the existing database. In this case you might have to implement migration your custom way for the imported data.
|
Beta Was this translation helpful? Give feedback.
-
Thank you for the explanation. I will come back to this thread when I run into issues. Really appreciate your efforts. |
Beta Was this translation helpful? Give feedback.
There is no upgrading support built into dexie-export-import. It's just that if you use importDB it will create a database with the same version as it was when it was exported. Opening it again using a declared Dexie instance with a higher version and upgraders declared, these upgraders will run into the data.
In your case, you have already existing data and you want to keep it and just merge the import into the existing database. In this case you might have to implement migration your custom way for the imported data.
use peakImportFile() to find out which data version the import file is on.