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