4016
|
1 ALTER TABLE waterway.gauge_measurements
|
|
2 DROP CONSTRAINT gauge_measurements_location_measure_date_staging_done_key;
|
|
3 ALTER TABLE waterway.gauge_measurements
|
|
4 ADD CONSTRAINT gauge_measurements_measure_date_location_staging_done_key
|
|
5 UNIQUE (measure_date, location, staging_done);
|
|
6 DROP INDEX waterway.gauge_measurements_measure_date;
|
|
7
|
|
8 ALTER TABLE waterway.gauge_predictions
|
|
9 DROP CONSTRAINT gauge_predictions_pkey;
|
|
10 ALTER TABLE waterway.gauge_predictions
|
|
11 ADD CONSTRAINT gauge_predictions_pkey
|
|
12 PRIMARY KEY (measure_date, location, date_issue);
|
|
13 DROP INDEX waterway.gauge_predictions_measure_date;
|
|
14
|
|
15 CREATE INDEX gauge_measurements_location_measure_date_desc
|
|
16 ON waterway.gauge_measurements (location, measure_date DESC)
|