equal
deleted
inserted
replaced
656 return |
656 return |
657 for cube, fromversion, toversion in toupgrade: |
657 for cube, fromversion, toversion in toupgrade: |
658 print '-> migration needed from %s to %s for %s' % (fromversion, toversion, cube) |
658 print '-> migration needed from %s to %s for %s' % (fromversion, toversion, cube) |
659 # only stop once we're sure we have something to do |
659 # only stop once we're sure we have something to do |
660 if not (cwcfg.mode == 'dev' or self.config.nostartstop): |
660 if not (cwcfg.mode == 'dev' or self.config.nostartstop): |
661 StopCommand().stop_instance(appid) |
661 StopInstanceCommand().stop_instance(appid) |
662 # run cubicweb/componants migration scripts |
662 # run cubicweb/componants migration scripts |
663 mih.migrate(vcconf, reversed(toupgrade), self.config) |
663 mih.migrate(vcconf, reversed(toupgrade), self.config) |
664 # rewrite main configuration file |
664 # rewrite main configuration file |
665 mih.rewrite_configuration() |
665 mih.rewrite_configuration() |
666 # handle i18n upgrade: |
666 # handle i18n upgrade: |
679 return |
679 return |
680 mih.shutdown() |
680 mih.shutdown() |
681 print |
681 print |
682 print '-> instance migrated.' |
682 print '-> instance migrated.' |
683 if not (cwcfg.mode == 'dev' or self.config.nostartstop): |
683 if not (cwcfg.mode == 'dev' or self.config.nostartstop): |
684 StartCommand().start_instance(appid) |
684 StartInstanceCommand().start_instance(appid) |
685 print |
685 print |
686 |
686 |
687 |
687 |
688 class ShellCommand(Command): |
688 class ShellCommand(Command): |
689 """Run an interactive migration shell. This is a python shell with |
689 """Run an interactive migration shell. This is a python shell with |