# HG changeset patch # User Denis Laxalde # Date 1486376491 -3600 # Node ID 73ed9c204de940a8bbc3b7125bbf489a2b532a29 # Parent f96f77a190f2121793081363268250d8a113f442 [migration] Move pyramid-related migration after "entities" table modifications Otherwise, we getting into `add_entity_type('CWSession')` we try to insert a CWEType without any 'asource' column (per 3.24's schema) whereas the backend still wants it. Closes #17054035. diff -r f96f77a190f2 -r 73ed9c204de9 cubicweb/misc/migration/3.24.0_Any.py --- a/cubicweb/misc/migration/3.24.0_Any.py Tue Jan 31 11:06:28 2017 +0100 +++ b/cubicweb/misc/migration/3.24.0_Any.py Mon Feb 06 11:21:31 2017 +0100 @@ -1,11 +1,6 @@ from base64 import b64decode -# Check the CW versions and add the entity only if needed ? -add_entity_type('CWSession') -rql('DELETE CWProperty X WHERE X pkey "system.version.pyramid"', - ask_confirm=False) - # before removing extid, ensure it's coherent with cwuri for eid, etype, encoded_extid in sql( "SELECT eid, type, extid FROM entities, cw_CWSource " @@ -21,3 +16,8 @@ # force cw_schema deletion before CWSourceSchemaConfig to avoid nasty bug drop_relation_type('cw_schema') drop_entity_type('CWSourceSchemaConfig') + +# Check the CW versions and add the entity only if needed ? +add_entity_type('CWSession') +rql('DELETE CWProperty X WHERE X pkey "system.version.pyramid"', + ask_confirm=False)