cubicweb/misc/migration/3.21.0_Any.py
changeset 11129 97095348b3ee
parent 11108 c14087d08698
parent 11057 0b59724cb3f2
child 11406 8ed625765a5c
--- a/cubicweb/misc/migration/3.21.0_Any.py	Thu Feb 11 21:59:49 2016 +0100
+++ b/cubicweb/misc/migration/3.21.0_Any.py	Wed Feb 17 13:45:34 2016 +0100
@@ -166,9 +166,9 @@
             cstr, helper, prefix='cw_')
     args = {'e': rdef.subject.type, 'c': cstrname, 'v': check}
     if repo.system_source.dbdriver == 'postgres':
-        sql('ALTER TABLE cw_%(e)s DROP CONSTRAINT IF EXISTS %(c)s' % args)
+        sql('ALTER TABLE cw_%(e)s DROP CONSTRAINT IF EXISTS %(c)s' % args, ask_confirm=False)
     elif repo.system_source.dbdriver.startswith('sqlserver'):
         sql("IF OBJECT_ID('%(c)s', 'C') IS NOT NULL "
-            "ALTER TABLE cw_%(e)s DROP CONSTRAINT %(c)s" % args)
-    sql('ALTER TABLE cw_%(e)s ADD CONSTRAINT %(c)s CHECK(%(v)s)' % args)
+            "ALTER TABLE cw_%(e)s DROP CONSTRAINT %(c)s" % args, ask_confirm=False)
+    sql('ALTER TABLE cw_%(e)s ADD CONSTRAINT %(c)s CHECK(%(v)s)' % args, ask_confirm=False)
 commit()