[migration] fix migration jumping from pre 3.12 to post 3.13 stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 27 Feb 2012 17:43:04 +0100
branchstable
changeset 8279 fa167153d384
parent 8278 3e8b94d921e0
child 8284 bca3e67fdba9
[migration] fix migration jumping from pre 3.12 to post 3.13
misc/migration/3.12.0_Any.py
misc/migration/bootstrapmigration_repository.py
--- a/misc/migration/3.12.0_Any.py	Mon Feb 27 17:40:56 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-if schema['TZDatetime'].eid is None:
-    add_entity_type('TZDatetime')
-if schema['TZTime'].eid is None:
-    add_entity_type('TZTime')
--- a/misc/migration/bootstrapmigration_repository.py	Mon Feb 27 17:40:56 2012 +0100
+++ b/misc/migration/bootstrapmigration_repository.py	Mon Feb 27 17:43:04 2012 +0100
@@ -1,4 +1,4 @@
-# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
@@ -40,6 +40,13 @@
     sql('UPDATE entities SET asource=cw_name  '
         'FROM cw_CWSource, cw_source_relation '
         'WHERE entities.eid=cw_source_relation.eid_from AND cw_source_relation.eid_to=cw_CWSource.cw_eid')
+    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, 14, 0) and cubicwebversion >= (3, 14, 0):
     if 'require_permission' in schema and not 'localperms'in repo.config.cubes():