server/test/data-schema2sql/schema/schema.py
changeset 10443 2d3834df64ab
parent 10199 218c28bff695
child 10907 9ae707db5265
--- a/server/test/data-schema2sql/schema/schema.py	Tue Jun 23 10:05:34 2015 +0200
+++ b/server/test/data-schema2sql/schema/schema.py	Mon May 18 11:36:07 2015 +0200
@@ -17,6 +17,7 @@
 # with yams. If not, see <http://www.gnu.org/licenses/>.
 from yams.buildobjs import (EntityType, RelationDefinition, RelationType,
                             SubjectRelation, String, Int, Float, Date, Boolean)
+from yams.constraints import Attribute, BoundaryConstraint
 
 class Affaire(EntityType):
     sujet = String(maxsize=128)
@@ -64,7 +65,7 @@
     nom  = String(maxsize=64, fulltextindexed=True)
     web = String(maxsize=128)
     tel  = Int()
-    fax  = Int()
+    fax  = Int(constraints=[BoundaryConstraint('<=', Attribute('tel'))])
     rncs = String(maxsize=32)
     ad1  = String(maxsize=128)
     ad2  = String(maxsize=128)