# HG changeset patch # User Sylvain Thénault # Date 1455268153 -3600 # Node ID c14087d086982c7a1d4814b01acdfc07d4401f8c # Parent df1f2d853d40a79e802bfb6a62a3e2633966c207 [migration] don't ask confirm for those sql queries diff -r df1f2d853d40 -r c14087d08698 misc/migration/3.21.0_Any.py --- a/misc/migration/3.21.0_Any.py Fri Feb 12 10:06:03 2016 +0100 +++ b/misc/migration/3.21.0_Any.py Fri Feb 12 10:09:13 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()