[Dive4elements-commits] [PATCH] sensible constraints for dem-table
Wald Commits
scm-commit at wald.intevation.org
Wed Feb 27 19:44:14 CET 2013
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1361990648 -3600
# Branch dami
# Node ID e4cc9aebfcf185c12680193068d0419bb4dd6abb
# Parent d49b3baa30d0c32525e3c76e42b8b5b4679cf43b
sensible constraints for dem-table
diff -r d49b3baa30d0 -r e4cc9aebfcf1 flys-backend/doc/schema/oracle-spatial.sql
--- a/flys-backend/doc/schema/oracle-spatial.sql Wed Feb 27 17:35:17 2013 +0100
+++ b/flys-backend/doc/schema/oracle-spatial.sql Wed Feb 27 19:44:08 2013 +0100
@@ -141,7 +141,7 @@
border_break NUMBER(1) DEFAULT 0 NOT NULL,
resolution VARCHAR(16),
description VARCHAR(256),
- path VARCHAR(256)
+ path VARCHAR(256) NOT NULL
);
CREATE OR REPLACE TRIGGER dem_trigger BEFORE INSERT ON dem FOR each ROW
BEGIN
diff -r d49b3baa30d0 -r e4cc9aebfcf1 flys-backend/doc/schema/postgresql-migrate-dami.sql
--- a/flys-backend/doc/schema/postgresql-migrate-dami.sql Wed Feb 27 17:35:17 2013 +0100
+++ b/flys-backend/doc/schema/postgresql-migrate-dami.sql Wed Feb 27 19:44:08 2013 +0100
@@ -118,6 +118,10 @@
ALTER TABLE hydr_boundaries ADD COLUMN sobek INT REFERENCES sobek_kinds(id);
ALTER TABLE hydr_boundaries ADD FOREIGN KEY (kind) REFERENCES boundary_kinds(id);
ALTER TABLE dem ADD COLUMN srid INT NOT NULL;
+ALTER TABLE dem ALTER COLUMN year_from DROP NOT NULL;
+ALTER TABLE dem ALTER COLUMN year_to DROP NOT NULL;
+ALTER TABLE dem ALTER COLUMN projection DROP NOT NULL;
+ALTER TABLE dem ALTER COLUMN path SET NOT NULL;
COMMIT;
diff -r d49b3baa30d0 -r e4cc9aebfcf1 flys-backend/doc/schema/postgresql-spatial.sql
--- a/flys-backend/doc/schema/postgresql-spatial.sql Wed Feb 27 17:35:17 2013 +0100
+++ b/flys-backend/doc/schema/postgresql-spatial.sql Wed Feb 27 19:44:08 2013 +0100
@@ -90,16 +90,16 @@
name VARCHAR(64),
lower FLOAT8,
upper FLOAT8,
- year_from VARCHAR(32) NOT NULL,
- year_to VARCHAR(32) NOT NULL,
- projection VARCHAR(32) NOT NULL,
+ year_from VARCHAR(32),
+ year_to VARCHAR(32),
+ projection VARCHAR(32),
srid int NOT NULL,
elevation_state VARCHAR(32),
format VARCHAR(32),
border_break BOOLEAN NOT NULL DEFAULT FALSE,
resolution VARCHAR(16),
description VARCHAR(256),
- path VARCHAR(256)
+ path VARCHAR(256) NOT NULL
);
ALTER TABLE dem ALTER COLUMN id SET DEFAULT NEXTVAL('DEM_ID_SEQ');
More information about the Dive4elements-commits
mailing list