From d450793d9551bf164b35e6b0030cb838796b4268 Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@jalin.de>
Date: Tue, 23 Apr 2013 18:17:13 +0200
Subject: [PATCH] update contraint

---
 hsarback/database/schema.sql |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/hsarback/database/schema.sql b/hsarback/database/schema.sql
index 1571a5f..093f566 100644
--- a/hsarback/database/schema.sql
+++ b/hsarback/database/schema.sql
@@ -153,7 +153,15 @@
     increment_quantity integer NOT NULL,
     include_quantity integer NOT NULL,
     admin_only boolean NOT NULL,
-    CONSTRAINT ckt_component CHECK (((((((((min_quantity <= max_quantity) AND (min_quantity <= default_quantity)) AND (default_quantity <= max_quantity)) AND (min_quantity <= include_quantity)) AND (include_quantity <= max_quantity)) AND (mod(max_quantity, increment_quantity) = 0)) AND (mod(default_quantity, increment_quantity) = 0)) AND (mod(include_quantity, increment_quantity) = 0)))
+    CONSTRAINT ckt_component CHECK (
+    	(min_quantity <= max_quantity) AND 
+    	(min_quantity <= default_quantity) AND 
+    	(default_quantity <= max_quantity) AND 
+    	(include_quantity <= max_quantity) AND 
+    	(mod(max_quantity, increment_quantity) = 0) AND 
+    	(mod(default_quantity, increment_quantity) = 0) AND 
+    	(mod(include_quantity, increment_quantity) = 0)
+    )
 );
 
 

--
Gitblit v1.9.0-SNAPSHOT