Mercurial > gemma
comparison schema/gemma.sql @ 3307:b90b17d0b5a9 sections-backend
added sections_geoserver view, renamed stretch column to section in schema
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Fri, 17 May 2019 11:28:20 +0200 |
parents | ec6163c6687d |
children | d9eda49a52f4 |
comparison
equal
deleted
inserted
replaced
3305:5932f9574493 | 3307:b90b17d0b5a9 |
---|---|
422 | 422 |
423 -- Like stretches without the countries | 423 -- Like stretches without the countries |
424 CREATE TABLE sections ( | 424 CREATE TABLE sections ( |
425 id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, | 425 id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, |
426 name varchar NOT NULL, | 426 name varchar NOT NULL, |
427 stretch isrsrange NOT NULL, | 427 section isrsrange NOT NULL, |
428 area geography(MULTIPOLYGON, 4326) NOT NULL | 428 area geography(MULTIPOLYGON, 4326) NOT NULL |
429 CHECK(ST_IsValid(CAST(area AS geometry))), | 429 CHECK(ST_IsValid(CAST(area AS geometry))), |
430 objnam varchar NOT NULL, | 430 objnam varchar NOT NULL, |
431 nobjnam varchar, | 431 nobjnam varchar, |
432 date_info timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, | 432 date_info timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, |
614 INSERT INTO waterway.gt_pk_metadata VALUES | 614 INSERT INTO waterway.gt_pk_metadata VALUES |
615 ('waterway', 'gauges_geoserver', 'location'), | 615 ('waterway', 'gauges_geoserver', 'location'), |
616 ('waterway', 'distance_marks_geoserver', 'location_code'), | 616 ('waterway', 'distance_marks_geoserver', 'location_code'), |
617 ('waterway', 'distance_marks_ashore_geoserver', 'id'), | 617 ('waterway', 'distance_marks_ashore_geoserver', 'id'), |
618 ('waterway', 'bottlenecks_geoserver', 'id'), | 618 ('waterway', 'bottlenecks_geoserver', 'id'), |
619 ('waterway', 'stretches_geoserver', 'id'); | 619 ('waterway', 'stretches_geoserver', 'id'), |
620 ('waterway', 'sections_geoserver', 'id'); | |
620 | 621 |
621 -- | 622 -- |
622 -- Import queue and respective logging | 623 -- Import queue and respective logging |
623 -- | 624 -- |
624 CREATE TYPE import_state AS ENUM ( | 625 CREATE TYPE import_state AS ENUM ( |