diff flys-backend/doc/schema/postgresql-spatial.sql @ 5409:8b29a94ebdd8

SCHEMA CHANGE: add table for flood marks and missing DROPs for jetties
author Tom Gottfried <tom@intevation.de>
date Mon, 25 Mar 2013 17:51:33 +0100
parents e65fee5ea98a
children 1488227b97b7
line wrap: on
line diff
--- a/flys-backend/doc/schema/postgresql-spatial.sql	Mon Mar 25 17:01:07 2013 +0100
+++ b/flys-backend/doc/schema/postgresql-spatial.sql	Mon Mar 25 17:51:33 2013 +0100
@@ -331,5 +331,17 @@
 SELECT AddGeometryColumn('jetties','geom',31467,'POINT',2);
 ALTER TABLE jetties ALTER COLUMN id SET DEFAULT NEXTVAL('JETTIES_ID_SEQ');
 
+CREATE SEQUENCE FLOOD_MARKS_ID_SEQ;
+CREATE TABLE flood_marks (
+    id         int PRIMARY KEY NOT NULL,
+    river_id   int REFERENCES rivers(id) ON DELETE CASCADE,
+    path       VARCHAR(256),
+    km         FLOAT8,
+    z	       FLOAT8,
+    location   VARCHAR(64),
+    year       int
+);
+SELECT AddGeometryColumn('flood_marks','geom',31467,'POINT',2);
+ALTER TABLE flood_marks ALTER COLUMN id SET DEFAULT NEXTVAL('FLOOD_MARKS_ID_SEQ');
 
 COMMIT;

http://dive4elements.wald.intevation.org