Open nicolas-raoul opened 10 years ago
sqlite implement PRAGMA user_version to do this.
Thanks for the tip Yannick! Can we merge your commit 83107add7795 ? @MoritakaSoma has been working on something similar: https://github.com/MoritakaSoma/CmisSync/commits/db_migration @MoritakaSoma could you please merge the work from Yannick too? Thanks!
Yes you can merge. It's working, I've migrated my own database with this code. If you change the SQL Schema, you must :
Perhaps this code could be moved in Migration.cs if we passed some variable as the sqliteconnection object that refer the database.
The format of the .cmissync SQLite database sometimes changes.
Have a key-value in table "general" to identify database format version.