Enable migrations from older database schemas.#1764
Conversation
|
I would like to opt to add a geopackage version in this PR and let's call everything that doesn't have it version 0, and from now on we will write a
For now, let's keep it as simple as you have it, although I would rather see a pipeline that migrates step by step. But that's for another moment in time. |
|
This doesn't yet include removing |
|
@deltamarnix This now writes the schema version to the geopackage (also from QGIS), which is used to check whether to migrate or not. @visr This now also migrates the other tables with |
deltamarnix
left a comment
There was a problem hiding this comment.
I want to see tests for the migration and the writing of the version files (both qgis and ribasim python)
Co-authored-by: Marnix <150045289+deltamarnix@users.noreply.github.com>
deltamarnix
left a comment
There was a problem hiding this comment.
If @SnippenE agrees that loading an old model in QGIS does not do the migration, but crashes instead, I am okay with the changes so far.
Fixes Deltares/Ribasim-NL#138
This has no schema version (stored in the geopackage) yet, but this is something we could implement in the future.