changeset 40:535e57373a93

Fix and comments on depth references.
author Tom Gottfried <tom@intevation.de>
date Mon, 07 May 2018 09:29:58 +0200
parents 830287983657
children dd858a74b4e9
files wamos.sql
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/wamos.sql	Fri May 04 19:12:37 2018 +0200
+++ b/wamos.sql	Mon May 07 09:29:58 2018 +0200
@@ -72,8 +72,14 @@
        );
 
 CREATE TABLE depth_references (
-       depth_reference char(3) PRIMARY KEY
-       -- Possible codes? char(3) ok?
+       depth_reference varchar(4) PRIMARY KEY
+       -- See col. AB and AI RIS-Index Encoding Guide
+       -- XXX: We need a way to distinguish between geodetic (eg. col. AP
+       -- RIS-Index) and other references (e.g. col. AB and AI):
+       -- _ multi-column FK with a boolean column (geodetic/non-geodetic;
+       --   i.e. absolut/not absolut) and DEFAULTs and CHECKs at the FK side.
+       -- _ Do not mixup things with different meanings in one table at all
+       --   (which would mean a model differing a bit from RIS-Index ideas)
        );
 
 CREATE TABLE bottlenecks (