diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-11-02 18:48:20 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-11-02 22:28:54 +0100 |
| commit | 7492e65bfebadfcd44d3e2e4916a9d19e4bc6ae2 (patch) | |
| tree | e93fe704abf9c95f4b3ef19f42e65bfd8f2a999a /data/sql/proj_db_table_defs.sql | |
| parent | 31fd3de9c2b2f823c01b3c2dbadddf4a7101fa16 (diff) | |
| download | PROJ-7492e65bfebadfcd44d3e2e4916a9d19e4bc6ae2.tar.gz PROJ-7492e65bfebadfcd44d3e2e4916a9d19e4bc6ae2.zip | |
Add a geoid_model name in database, use GEOIDMODEL for transformations, add a proj_create_vertical_crs_ex()
Diffstat (limited to 'data/sql/proj_db_table_defs.sql')
| -rw-r--r-- | data/sql/proj_db_table_defs.sql | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/data/sql/proj_db_table_defs.sql b/data/sql/proj_db_table_defs.sql index 8a02acf4..a97e75a8 100644 --- a/data/sql/proj_db_table_defs.sql +++ b/data/sql/proj_db_table_defs.sql @@ -1365,6 +1365,23 @@ FOR EACH ROW BEGIN END; + +CREATE TABLE geoid_model( + name TEXT NOT NULL, + operation_auth_name TEXT NOT NULL, + operation_code TEXT NOT NULL, + CONSTRAINT pk_geoid_model PRIMARY KEY (name, operation_auth_name, operation_code) + -- CONSTRATINT fk_geoid_model_operation FOREIGN KEY (operation_auth_name, operation_code) REFERENCES coordinate_operation(auth_name, code) +); + +CREATE TRIGGER geoid_model_insert_trigger +BEFORE INSERT ON geoid_model +FOR EACH ROW BEGIN + SELECT RAISE(ABORT, 'insert on geoid_model violates constraint: (operation_auth_name, operation_code) must already exist in coordinate_operation_with_conversion_view') + WHERE NOT EXISTS (SELECT 1 FROM coordinate_operation_with_conversion_view covwv WHERE covwv.auth_name = NEW.operation_auth_name AND covwv.code = NEW.operation_code); +END; + + CREATE TABLE alias_name( table_name TEXT NOT NULL CHECK (table_name IN ( 'unit_of_measure', 'celestial_body', 'ellipsoid', |
