[Lada-commits] [PATCH 10 of 10] A period with end before start is meaningless

Wald Commits scm-commit at wald.intevation.org
Thu Sep 29 16:54:51 CEST 2016


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1475160509 -7200
# Node ID daca5c62356fcda41d643881106cee799e172da4
# Parent  7d87ddba55202a14e3e3f6021e4a3f527ba1277a
A period with end before start is meaningless.

diff -r 7d87ddba5520 -r daca5c62356f db_schema/lada_schema.sql
--- a/db_schema/lada_schema.sql	Thu Sep 29 16:23:04 2016 +0200
+++ b/db_schema/lada_schema.sql	Thu Sep 29 16:48:29 2016 +0200
@@ -745,7 +745,8 @@
     mpr_id integer,
     solldatum_beginn timestamp without time zone,
     solldatum_ende timestamp without time zone,
-    tree_modified timestamp without time zone DEFAULT now()
+    tree_modified timestamp without time zone DEFAULT now(),
+    CHECK(solldatum_beginn <= solldatum_ende)
 )
 INHERITS (bund.probe);
 


More information about the Lada-commits mailing list