cubicweb/hooks/syncschema.py
changeset 11406 8ed625765a5c
parent 11362 ebe75d73acdd
child 11411 9a5a6ec5fc09
--- a/cubicweb/hooks/syncschema.py	Wed Jun 29 15:07:55 2016 +0200
+++ b/cubicweb/hooks/syncschema.py	Thu Jun 30 13:25:43 2016 +0200
@@ -815,8 +815,8 @@
                                             (self.oldcstr.serialize() or '')).encode('ascii')).hexdigest()
                 cnx.system_sql('ALTER TABLE %s%s DROP CONSTRAINT %s' %
                                (SQL_PREFIX, rdef.subject.type, oldcstrname))
-            cstrname, check = y2sql.check_constraint(rdef.subject, rdef.object, rdef.rtype.type,
-                    newcstr, syssource.dbhelper, prefix=SQL_PREFIX)
+            cstrname, check = y2sql.check_constraint(rdef, newcstr, syssource.dbhelper,
+                                                     prefix=SQL_PREFIX)
             cnx.system_sql('ALTER TABLE %s%s ADD CONSTRAINT %s CHECK(%s)' %
                            (SQL_PREFIX, rdef.subject.type, cstrname, check))