Mercurial > gemma
annotate schema/updates/1315/01.extend_efa_primarykey.sql @ 5437:eeee1c411576 marking-single-beam
Pdf-Template: Use survey-date for {date-minor} when bottleneck survey is visible.
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 13 Jul 2021 12:24:29 +0200 |
parents | 082027fb2d58 |
children |
rev | line source |
---|---|
4859
082027fb2d58
Allow "Measured" and "Forecast" values to coexist for the same time and gauge.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
1 -- To allow "Measured" and "Forecast" values to coexist for the same |
082027fb2d58
Allow "Measured" and "Forecast" values to coexist for the same time and gauge.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
2 -- time and gauge, the primary key must include the measure_type. |
082027fb2d58
Allow "Measured" and "Forecast" values to coexist for the same time and gauge.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
3 |
082027fb2d58
Allow "Measured" and "Forecast" values to coexist for the same time and gauge.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
4 ALTER TABLE waterway.effective_fairway_availability |
082027fb2d58
Allow "Measured" and "Forecast" values to coexist for the same time and gauge.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
5 DROP CONSTRAINT effective_fairway_availability_pkey; |
082027fb2d58
Allow "Measured" and "Forecast" values to coexist for the same time and gauge.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
6 |
082027fb2d58
Allow "Measured" and "Forecast" values to coexist for the same time and gauge.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
7 ALTER TABLE waterway.effective_fairway_availability |
082027fb2d58
Allow "Measured" and "Forecast" values to coexist for the same time and gauge.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
8 ADD PRIMARY KEY (fairway_availability_id, measure_date, |
082027fb2d58
Allow "Measured" and "Forecast" values to coexist for the same time and gauge.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
9 level_of_service, measure_type); |