Mercurial > gemma
comparison schema/gemma.sql @ 2864:96781e519952
Fix syntax error in schema
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 29 Mar 2019 12:02:22 +0100 |
parents | e2d362589ce6 |
children | 23ff7f6c543b |
comparison
equal
deleted
inserted
replaced
2863:e2d362589ce6 | 2864:96781e519952 |
---|---|
346 -- | 346 -- |
347 -- So we can have a staged and a non-staged | 347 -- So we can have a staged and a non-staged |
348 -- fk_gauge_id/measure_date pairs in measured values. | 348 -- fk_gauge_id/measure_date pairs in measured values. |
349 CREATE UNIQUE INDEX gm_measured_unique_constraint | 349 CREATE UNIQUE INDEX gm_measured_unique_constraint |
350 ON gauge_measurements (fk_gauge_id, measure_date, staging_done) | 350 ON gauge_measurements (fk_gauge_id, measure_date, staging_done) |
351 WHERE NOT predicted; | 351 WHERE NOT predicted |
352 -- And we can have multiple predictions for one point in time | 352 -- And we can have multiple predictions for one point in time |
353 -- (but they are never staged). | 353 -- (but they are never staged). |
354 CREATE UNIQUE INDEX gm_predicted_unique_constraint | 354 CREATE UNIQUE INDEX gm_predicted_unique_constraint |
355 ON gauge_measurements (fk_gauge_id, measure_date, date_issue) | 355 ON gauge_measurements (fk_gauge_id, measure_date, date_issue) |
356 WHERE predicted; | 356 WHERE predicted |
357 | 357 |
358 CREATE TABLE waterway_axis ( | 358 CREATE TABLE waterway_axis ( |
359 id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, | 359 id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, |
360 wtwaxs geography(LINESTRING, 4326) NOT NULL | 360 wtwaxs geography(LINESTRING, 4326) NOT NULL |
361 CHECK(ST_IsSimple(CAST(wtwaxs AS geometry))), | 361 CHECK(ST_IsSimple(CAST(wtwaxs AS geometry))), |