aboutsummaryrefslogtreecommitdiff
path: root/data/sql/proj_db_table_defs.sql
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-04-04 22:44:07 +0200
committerEven Rouault <even.rouault@spatialys.com>2021-04-06 23:30:19 +0200
commit950ce787b26b3b3afd0ff76151fdf72d1381b7a1 (patch)
treeb2d70e6c7151361c6cf9e99592ada7386c4a1d95 /data/sql/proj_db_table_defs.sql
parentf85b0723136eed9891569b988607f07ef185d504 (diff)
downloadPROJ-950ce787b26b3b3afd0ff76151fdf72d1381b7a1.tar.gz
PROJ-950ce787b26b3b3afd0ff76151fdf72d1381b7a1.zip
Database: nullify auth_name, code of usage table
We never select by those columns, so don't set them. Reduce from 8.4 to 7.9 MB. Upgrade the minor version of the database layout. (that database can still be read by PROJ 8.0)
Diffstat (limited to 'data/sql/proj_db_table_defs.sql')
-rw-r--r--data/sql/proj_db_table_defs.sql6
1 files changed, 3 insertions, 3 deletions
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