diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-11-30 14:00:46 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-11-30 14:09:37 +0100 |
| commit | eef73e3eca2959768563d2dbb95a591c68b1d807 (patch) | |
| tree | df5168b7f870ec8067d1e7f259e9845b6f387242 /data/sql/metadata.sql | |
| parent | 36c700192cee19a1070916dd094118a33a29ebe2 (diff) | |
| download | PROJ-eef73e3eca2959768563d2dbb95a591c68b1d807.tar.gz PROJ-eef73e3eca2959768563d2dbb95a591c68b1d807.zip | |
Database: add metadata with the version number of the database layout and check it in the code
This is aimed at detecting running a PROJ version against a proj.db that is not
meant to work with it. This happens sometimes in complex setups mixing PROJ
versions. Hopefully this will help spotting the issue earlier.
Diffstat (limited to 'data/sql/metadata.sql')
| -rw-r--r-- | data/sql/metadata.sql | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/data/sql/metadata.sql b/data/sql/metadata.sql index 3c21636c..adcee507 100644 --- a/data/sql/metadata.sql +++ b/data/sql/metadata.sql @@ -1,2 +1,13 @@ +-- Version of the database structure. +-- The major number indicates an incompatible change (e.g. table or column +-- removed or renamed). +-- The minor number is incremented if a backward compatible change done, that +-- is the new database can still work with an older PROJ version. +-- When updating those numbers, the DATABASE_LAYOUT_VERSION_MAJOR and +-- DATABASE_LAYOUT_VERSION_MINOR constants in src/iso19111/factory.cpp must be +-- updated as well. +INSERT INTO "metadata" VALUES('DATABASE.LAYOUT.VERSION.MAJOR', 1); +INSERT INTO "metadata" VALUES('DATABASE.LAYOUT.VERSION.MINOR', 0); + INSERT INTO "metadata" VALUES('EPSG.VERSION', 'v10.007'); INSERT INTO "metadata" VALUES('EPSG.DATE', '2020-11-18'); |
