annotate schema/updates/1460/01.markings.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
children 2d294ad81241
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,
f5063fa7f666 Add schema change for marking vessel single beam scans.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
7 points geography(MULTIPOINT, 4326) NOT NULL,
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;