diff options
Diffstat (limited to 'data/sql')
| -rw-r--r-- | data/sql/commit.sql | 3 | ||||
| -rw-r--r-- | data/sql/metadata.sql | 2 | ||||
| -rw-r--r-- | data/sql/proj_db_table_defs.sql | 6 |
3 files changed, 7 insertions, 4 deletions
diff --git a/data/sql/commit.sql b/data/sql/commit.sql index 7a4b74ad..3cdb0861 100644 --- a/data/sql/commit.sql +++ b/data/sql/commit.sql @@ -9,6 +9,9 @@ CREATE INDEX grid_transformation_idx ON grid_transformation(source_crs_auth_name CREATE INDEX other_transformation_idx ON other_transformation(source_crs_auth_name, source_crs_code, target_crs_auth_name, target_crs_code); CREATE INDEX concatenated_operation_idx ON concatenated_operation(source_crs_auth_name, source_crs_code, target_crs_auth_name, target_crs_code); +-- We don't need to select by auth_name, code so nullify them to save space +UPDATE usage SET auth_name = NULL, code = NULL; + -- Final consistency checks CREATE TABLE dummy(foo); CREATE TRIGGER final_checks diff --git a/data/sql/metadata.sql b/data/sql/metadata.sql index bb8e3095..93b4c62e 100644 --- a/data/sql/metadata.sql +++ b/data/sql/metadata.sql @@ -7,7 +7,7 @@ -- 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('DATABASE.LAYOUT.VERSION.MINOR', 1); INSERT INTO "metadata" VALUES('EPSG.VERSION', 'v10.018'); INSERT INTO "metadata" VALUES('EPSG.DATE', '2021-04-02'); diff --git a/data/sql/proj_db_table_defs.sql b/data/sql/proj_db_table_defs.sql index 08f74c34..9b1d3dce 100644 --- a/data/sql/proj_db_table_defs.sql +++ b/data/sql/proj_db_table_defs.sql @@ -86,8 +86,8 @@ CREATE TABLE scope( ); CREATE TABLE usage( - auth_name TEXT NOT NULL CHECK (length(auth_name) >= 1), - code INTEGER_OR_TEXT NOT NULL CHECK (length(code) >= 1), + auth_name TEXT CHECK (auth_name IS NULL OR length(auth_name) >= 1), + code INTEGER_OR_TEXT CHECK (code IS NULL OR length(code) >= 1), object_table_name TEXT NOT NULL CHECK (object_table_name IN ( 'geodetic_datum', 'vertical_datum', 'geodetic_crs', 'projected_crs', 'vertical_crs', 'compound_crs', @@ -1490,7 +1490,7 @@ CREATE VIEW authority_list AS UNION SELECT DISTINCT auth_name FROM scope UNION - SELECT DISTINCT auth_name FROM usage + SELECT DISTINCT auth_name FROM usage WHERE auth_name IS NOT NULL UNION SELECT DISTINCT auth_name FROM prime_meridian UNION |
