Mercurial > gemma
changeset 1826:d4e2637eed58
Schema: Adjust gauges once again to be in sync with RIS index.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 16 Jan 2019 12:56:54 +0100 |
parents | 484ae4fe09d7 |
children | 27c4effba5b1 |
files | schema/gemma.sql |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/schema/gemma.sql Wed Jan 16 12:42:34 2019 +0100 +++ b/schema/gemma.sql Wed Jan 16 12:56:54 2019 +0100 @@ -240,17 +240,17 @@ (location).orc SIMILAR TO 'G[[:digit:]]{4}' AND CAST(substring((location).orc from 2 for 4) AS int) < 2048), objname varchar NOT NULL, - is_left boolean, -- XXX: Or reference position_codes? geom geography(POINT, 4326) NOT NULL, - applicability isrsrange, - validity tstzrange,-- XXX: Should ranges be NOT NULL? In DRC, only copy + applicability_from_km int8, + applicability_to_km int8, + validity tstzrange, -- pasted text from a more general specification is given -- (a gauge is not a berth!) -- TODO: Ranges need a joint exclusion constaint to prevent overlaps? zero_point double precision NOT NULL, geodref varchar(4) REFERENCES depth_references, date_info timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, - source_organization varchar NOT NULL + source_organization varchar ) CREATE TRIGGER gauges_date_info BEFORE UPDATE ON gauges FOR EACH ROW EXECUTE PROCEDURE update_date_info()