# HG changeset patch # User Julien Cristau # Date 1455714236 -3600 # Node ID 20b2e7ceecf6b8e5fe9e9bbe27407134ed000f0c # Parent 4d2a7d6c9390e3305f401550504aa534938cea68 [migration] move CWComputedRType later The ordering in this file is a mess, and things don't actually work this way (when upgrading from 3.17). diff -r 4d2a7d6c9390 -r 20b2e7ceecf6 cubicweb/misc/migration/bootstrapmigration_repository.py --- a/cubicweb/misc/migration/bootstrapmigration_repository.py Thu May 19 09:18:56 2016 +0200 +++ b/cubicweb/misc/migration/bootstrapmigration_repository.py Wed Feb 17 14:03:56 2016 +0100 @@ -87,18 +87,6 @@ replace_eid_sequence_with_eid_numrange(session) -if applcubicwebversion < (3, 20, 0) and cubicwebversion >= (3, 20, 0): - ss._IGNORED_PROPS.append('formula') - add_attribute('CWAttribute', 'formula', commit=False) - ss._IGNORED_PROPS.remove('formula') - commit() - add_entity_type('CWComputedRType') - commit() - -if schema['TZDatetime'].eid is None: - add_entity_type('TZDatetime', auto=False) -if schema['TZTime'].eid is None: - add_entity_type('TZTime', auto=False) if applcubicwebversion < (3, 18, 0) and cubicwebversion >= (3, 18, 0): driver = config.system_source_config['db-driver'] @@ -437,6 +425,19 @@ if applcubicwebversion < (3, 2, 0) and cubicwebversion >= (3, 2, 0): add_cube('card', update_database=False) +if applcubicwebversion < (3, 20, 0) and cubicwebversion >= (3, 20, 0): + ss._IGNORED_PROPS.append('formula') + add_attribute('CWAttribute', 'formula', commit=False) + ss._IGNORED_PROPS.remove('formula') + commit() + add_entity_type('CWComputedRType') + commit() + +if schema['TZDatetime'].eid is None: + add_entity_type('TZDatetime', auto=False) +if schema['TZTime'].eid is None: + add_entity_type('TZTime', auto=False) + if applcubicwebversion < (3, 21, 1) and cubicwebversion >= (3, 21, 1): add_relation_definition('CWComputedRType', 'read_permission', 'CWGroup')