comparison schema/gemma.sql @ 5402:f5063fa7f666 marking-single-beam

Add schema change for marking vessel single beam scans.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 06 Jul 2021 00:30:39 +0200
parents 23a30ba08243
children 2d294ad81241
comparison
equal deleted inserted replaced
5398:dcc692a333c0 5402:f5063fa7f666
351 351
352 CREATE TABLE survey_types ( 352 CREATE TABLE survey_types (
353 survey_type varchar PRIMARY KEY 353 survey_type varchar PRIMARY KEY
354 ); 354 );
355 355
356 INSERT INTO survey_types (survey_type) VALUES ('single'), ('multi'); 356 INSERT INTO survey_types (survey_type) VALUES ('single'), ('multi'), ('marking');
357 357
358 CREATE TABLE coverage_types ( 358 CREATE TABLE coverage_types (
359 coverage_type varchar PRIMARY KEY 359 coverage_type varchar PRIMARY KEY
360 ); 360 );
361 361
826 areas geography(MULTIPOLYGON, 4326) NOT NULL, 826 areas geography(MULTIPOLYGON, 4326) NOT NULL,
827 -- TODO: generate valid simple features and add constraint: 827 -- TODO: generate valid simple features and add constraint:
828 -- CHECK(ST_IsSimple(CAST(areas AS geometry))), 828 -- CHECK(ST_IsSimple(CAST(areas AS geometry))),
829 PRIMARY KEY (sounding_result_id, height) 829 PRIMARY KEY (sounding_result_id, height)
830 ) 830 )
831
832 CREATE TABLE sounding_results_marking_points (
833 sounding_result_id int NOT NULL REFERENCES sounding_results
834 ON DELETE CASCADE,
835 height numeric NOT NULL,
836 points geography(MULTIPOINT, 4326) NOT NULL,
837 PRIMARY KEY (sounding_result_id, height)
838 )
839
831 -- 840 --
832 -- Fairway availability 841 -- Fairway availability
833 -- 842 --
834 CREATE TABLE fairway_availability ( 843 CREATE TABLE fairway_availability (
835 id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, 844 id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,