# HG changeset patch # User Sylvain Thénault # Date 1466428224 -7200 # Node ID eedf0684533cba4313ecb95e2d07743d049928d8 # Parent a702d31ddd8fae8d84c872642969a0b869874969 [migration] drop identity_relation if it exists It has been generated erroneously for a while, then fixed but not properly deleted from old databases. Don't use IF EXISTS for sqlserver compat. diff -r a702d31ddd8f -r eedf0684533c cubicweb/misc/migration/3.23.0_Any.py --- a/cubicweb/misc/migration/3.23.0_Any.py Wed Jun 22 14:35:43 2016 +0200 +++ b/cubicweb/misc/migration/3.23.0_Any.py Mon Jun 20 15:10:24 2016 +0200 @@ -60,3 +60,6 @@ sql('ALTER TABLE cw_%(e)s ADD CONSTRAINT %(c)s CHECK(%(v)s)' % args) commit() + +if 'identity_relation' in helper.list_tables(cnx.cnxset.cu): + sql('DROP TABLE identity_relation')