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

Identify schema version of old spatialites TOPDESK 2406 0054 #241

Closed
leendertvanwolfswinkel opened this issue Jun 26, 2024 · 1 comment
Closed
Assignees

Comments

@leendertvanwolfswinkel
Copy link
Collaborator

leendertvanwolfswinkel commented Jun 26, 2024

In the current database schema, the schema version is stored in schema_version.version_num. In older spatialites, this table does not exist. The schema version for such older sqlites can be derived from south_migrationhistory.migration: it is the first 4 characters of the last record in this table.

When I try to load such an old sqlite with the schematisation editor, I get this message:

image.png

It is perfectly possible to migrate even these old spatialites to the current schema version. So I think that if the schema_version table cannot be found, it should look for the south_migrationhistory table to derive the schema version number and propose to migrate it to the current schema version.

Example data:
bwn_waar_woud_spek_eet.zip

@leendertvanwolfswinkel leendertvanwolfswinkel added bug Something isn't working and removed bug Something isn't working labels Jun 26, 2024
@leendertvanwolfswinkel leendertvanwolfswinkel changed the title Identify schema version of old spatialites Identify schema version of old spatialites TOPDESK 2406 0054 Jun 26, 2024
@leendertvanwolfswinkel
Copy link
Collaborator Author

@ldebek Perfect, please merge

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

3 participants