# HG changeset patch # User Sylvain Thénault # Date 1248441182 -7200 # Node ID 24bad65dbebdfb20cffeb9f30fbe9bd74cd95525 # Parent a04caff1322ee3eb7000f6a1791576daaea397a8 take care to migration w/ X.Y.Z_Any.py / X.Y.Z_common.py diff -r a04caff1322e -r 24bad65dbebd common/migration.py --- a/common/migration.py Fri Jul 24 15:12:40 2009 +0200 +++ b/common/migration.py Fri Jul 24 15:13:02 2009 +0200 @@ -152,11 +152,15 @@ migrdir = self.config.cube_migration_scripts_dir(cube) scripts = filter_scripts(self.config, migrdir, fromversion, toversion) if scripts: + prevversion = None for version, script in scripts: + # take care to X.Y.Z_Any.py / X.Y.Z_common.py: we've to call + # cube_upgraded once all script of X.Y.Z have been executed + if prevversion is not None and version != prevversion: + self.cube_upgraded(cube, version) + prevversion = version self.process_script(script) - self.cube_upgraded(cube, version) - if version != toversion: - self.cube_upgraded(cube, toversion) + self.cube_upgraded(cube, toversion) else: self.cube_upgraded(cube, toversion)