annotate schema/updates/1460/01.markings.sql @ 5736:55892008ec96 default tip

Fixed a bunch of corner cases in WG import.
author Sascha Wilde <wilde@sha-bang.de>
date Wed, 29 May 2024 19:02:42 +0200
parents ad8e3fffb868
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5402
f5063fa7f666 Add schema change for marking vessel single beam scans.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
1 INSERT INTO survey_types (survey_type) VALUES ('marking');
f5063fa7f666 Add schema change for marking vessel single beam scans.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
2
f5063fa7f666 Add schema change for marking vessel single beam scans.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
3 CREATE TABLE waterway.sounding_results_marking_points (
f5063fa7f666 Add schema change for marking vessel single beam scans.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
4 sounding_result_id int NOT NULL REFERENCES waterway.sounding_results
f5063fa7f666 Add schema change for marking vessel single beam scans.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
5 ON DELETE CASCADE,
f5063fa7f666 Add schema change for marking vessel single beam scans.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
6 height numeric NOT NULL,
5422
ad8e3fffb868 schema: geography supports MULTIPOINTZ as modifier.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 5417
diff changeset
7 points geography(MULTIPOINTZ, 4326) NOT NULL,
5402
f5063fa7f666 Add schema change for marking vessel single beam scans.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
8 PRIMARY KEY (sounding_result_id, height)
f5063fa7f666 Add schema change for marking vessel single beam scans.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
9 );
f5063fa7f666 Add schema change for marking vessel single beam scans.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
10
f5063fa7f666 Add schema change for marking vessel single beam scans.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
11 GRANT INSERT, UPDATE, DELETE ON waterway.sounding_results_marking_points
f5063fa7f666 Add schema change for marking vessel single beam scans.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
12 TO waterway_admin;
f5063fa7f666 Add schema change for marking vessel single beam scans.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
13
f5063fa7f666 Add schema change for marking vessel single beam scans.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
14 GRANT SELECT ON waterway.sounding_results_marking_points
f5063fa7f666 Add schema change for marking vessel single beam scans.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
15 TO waterway_user;