Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force geopackage migration on upgrade to 300 #138

Open
margrietpalm opened this issue Nov 21, 2024 · 0 comments
Open

Force geopackage migration on upgrade to 300 #138

margrietpalm opened this issue Nov 21, 2024 · 0 comments
Assignees

Comments

@margrietpalm
Copy link
Contributor

margrietpalm commented Nov 21, 2024

Upgrading from spatialite 3 to 4 happens after all migration steps are completed. This is necessary because the steps for this upgrade require the sqlites to match the model. Unfortunately, this requires that this upgrade remains working after every migration. To prevent this issue from continuing into schema 300 the following is proposed:

  1. Migrate to schema 300
  2. Convert to geopackage
  3. Migrate to requested version (if > 300)

This has the following advantages

  • Migrations after 300 do not need to be compatible with the spatialite upgrade
  • Migrations after 300 do not need to support spatialite

Note that this does require the geopackage conversion to work without the matching ORM for the schematisation.

Add some checks in the upgrade function:

  • Upgrading to version < 230: input must be spatialite
  • Upgrading to version > 300: input must be geopackage
@margrietpalm margrietpalm self-assigned this Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant