--- a/cwctl.py Mon Jun 20 19:13:38 2011 +0200
+++ b/cwctl.py Tue Jun 21 10:44:43 2011 +0200
@@ -757,18 +757,16 @@
applcubicwebversion = vcconf.get('cubicweb')
if cubicwebversion > applcubicwebversion:
toupgrade.append(('cubicweb', applcubicwebversion, cubicwebversion))
- if not self.config.fs_only and not toupgrade:
- print '-> no data migration needed for instance %s.' % appid
- self.i18nupgrade(config)
- mih.shutdown()
- return
- for cube, fromversion, toversion in toupgrade:
- print '-> migration needed from %s to %s for %s' % (fromversion, toversion, cube)
# only stop once we're sure we have something to do
if not (CWDEV or self.config.nostartstop):
StopInstanceCommand(self.logger).stop_instance(appid)
# run cubicweb/componants migration scripts
- mih.migrate(vcconf, reversed(toupgrade), self.config)
+ if self.config.fs_only or toupgrade:
+ for cube, fromversion, toversion in toupgrade:
+ print '-> migration needed from %s to %s for %s' % (fromversion, toversion, cube)
+ mih.migrate(vcconf, reversed(toupgrade), self.config)
+ else:
+ print '-> no data migration needed for instance %s.' % appid
# rewrite main configuration file
mih.rewrite_configuration()
mih.shutdown()
--- a/migration.py Mon Jun 20 19:13:38 2011 +0200
+++ b/migration.py Tue Jun 21 10:44:43 2011 +0200
@@ -492,6 +492,8 @@
self.warnings.append(
'cube %s depends on %s but constraint badly '
'formatted: %s' % (cube, name, constraint))
+ else:
+ self.reverse_dependencies[name].add( (None, None, cube) )
# check consistency
for cube, versions in sorted(self.reverse_dependencies.items()):
oper, version, source = None, None, None
@@ -517,5 +519,7 @@
if oper in ('>=','='):
if lower_strict:
self.errors.append( ('update', cube, version, source) )
+ elif oper is None:
+ pass # no constraint on version
else:
print 'unknown operator', oper
--- a/misc/migration/3.12.0_Any.py Mon Jun 20 19:13:38 2011 +0200
+++ b/misc/migration/3.12.0_Any.py Tue Jun 21 10:44:43 2011 +0200
@@ -1,2 +1,4 @@
-add_entity_type('TZDatetime')
-add_entity_type('TZTime')
+if schema['TZDatetime'].eid is None:
+ add_entity_type('TZDatetime')
+if schema['TZTime'].eid is None:
+ add_entity_type('TZTime')