convert DB from version 1 to 3
Hi I'm trying to upgrade my app from version 1.0.9 to latest 3.0.5.
In 1.0.9 I used the encryptionEnable method on my mapdb file
DBMaker.newFileDB(new File(dbFileName)) .closeOnJvmShutdown() .encryptionEnable(dbPassword.getUnderline()) .make();
when converting to version 3, the encryptionEnable was removed.
How can I migrate my data ?
when trying to open the file created in version 1.0.9 with 3.0.5 I get this exception:
Caused by: org.mapdb.DBException$WrongFormat: Wrong file header, not MapDB file
at org.mapdb.StoreDirectAbstract.fileHeaderCheck(StoreDirectAbstract.kt:99)
at org.mapdb.StoreDirect.
Same here. Documents and examples about migration is needed. Current version is v1.0.9 and it's real hard to do the upgrade.
I think you basically have to
- make a shadow jar of mapdb 1.x
- make a shadow jar of mapdb 3.x
- create a java project where you load both libraries from step 1 and 2 then open the mapdb 1.x and feed the tables from your application into mapdb 3.x table