[migration] move CWComputedRType later
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 17 Feb 2016 14:03:56 +0100
changeset 11245 20b2e7ceecf6
parent 11244 4d2a7d6c9390
child 11246 ceb0e8e9129e
[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).
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')