[migration] Only drop moved table entities if it does not exists 3.25
authorYann Voté <yann.vote@logilab.fr>
Thu, 27 Apr 2017 10:16:39 +0200
branch3.25
changeset 12185 c46f2bf815d2
parent 12184 cd940ebefc4e
child 12186 36f1c7ab9010
[migration] Only drop moved table entities if it does not exists For very old instances (namely docaster), this table has never been created.
cubicweb/misc/migration/3.24.0_Any.py
--- a/cubicweb/misc/migration/3.24.0_Any.py	Fri May 05 17:57:10 2017 +0200
+++ b/cubicweb/misc/migration/3.24.0_Any.py	Thu Apr 27 10:16:39 2017 +0200
@@ -8,7 +8,7 @@
     sql('UPDATE cw_{} SET cw_cwuri=%(cwuri)s WHERE cw_eid=%(eid)s'.format(etype),
         {'eid': eid, 'cwuri': b64decode(encoded_extid)})
 
-sql('DROP TABLE moved_entities')
+sql('DROP TABLE IF EXISTS moved_entities')
 sql('ALTER TABLE entities DROP COLUMN asource')
 sql('ALTER TABLE entities DROP COLUMN extid')
 sql('DROP INDEX entities_type_idx')