Mercurial > gemma
view schema/updates/1315/01.extend_efa_primarykey.sql @ 5545:a4fa1bf9b208 aggregate-gm-import-logging
Aggregate to 'bla: 1 (baz); 2 (foo, bar)' instead of 'bla: foo (2), baz (1), bar (2)'.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 29 Oct 2021 00:07:50 +0200 |
parents | 082027fb2d58 |
children |
line wrap: on
line source
-- To allow "Measured" and "Forecast" values to coexist for the same -- time and gauge, the primary key must include the measure_type. ALTER TABLE waterway.effective_fairway_availability DROP CONSTRAINT effective_fairway_availability_pkey; ALTER TABLE waterway.effective_fairway_availability ADD PRIMARY KEY (fairway_availability_id, measure_date, level_of_service, measure_type);