common/migration.py
changeset 2968 0e3460341023
parent 2897 2658f432284c
child 3152 7ef7c82daf59
child 3201 8af05e82510c
equal deleted inserted replaced
2902:dd9f2dd02f85 2968:0e3460341023
   155                 prevversion = None
   155                 prevversion = None
   156                 for version, script in scripts:
   156                 for version, script in scripts:
   157                     # take care to X.Y.Z_Any.py / X.Y.Z_common.py: we've to call
   157                     # take care to X.Y.Z_Any.py / X.Y.Z_common.py: we've to call
   158                     # cube_upgraded once all script of X.Y.Z have been executed
   158                     # cube_upgraded once all script of X.Y.Z have been executed
   159                     if prevversion is not None and version != prevversion:
   159                     if prevversion is not None and version != prevversion:
   160                         self.cube_upgraded(cube, version)
   160                         self.cube_upgraded(cube, prevversion)
   161                     prevversion = version
   161                     prevversion = version
   162                     self.process_script(script)
   162                     self.process_script(script)
   163                 self.cube_upgraded(cube, toversion)
   163                 self.cube_upgraded(cube, toversion)
   164             else:
   164             else:
   165                 self.cube_upgraded(cube, toversion)
   165                 self.cube_upgraded(cube, toversion)