equal
deleted
inserted
replaced
39 from six.moves.urllib.parse import urlparse |
39 from six.moves.urllib.parse import urlparse |
40 |
40 |
41 from logilab.common.clcommands import CommandLine |
41 from logilab.common.clcommands import CommandLine |
42 from logilab.common.shellutils import ASK |
42 from logilab.common.shellutils import ASK |
43 from logilab.common.configuration import merge_options |
43 from logilab.common.configuration import merge_options |
|
44 from logilab.common.decorators import clear_cache |
44 |
45 |
45 from cubicweb import ConfigurationError, ExecutionError, BadCommandUsage |
46 from cubicweb import ConfigurationError, ExecutionError, BadCommandUsage |
46 from cubicweb.cwconfig import CubicWebConfiguration as cwcfg, CWDEV, CONFIGURATIONS |
47 from cubicweb.cwconfig import CubicWebConfiguration as cwcfg, CWDEV, CONFIGURATIONS |
47 from cubicweb.toolsutils import Command, rm, create_dir, underline_title |
48 from cubicweb.toolsutils import Command, rm, create_dir, underline_title |
48 from cubicweb.__pkginfo__ import version |
49 from cubicweb.__pkginfo__ import version |
747 for cube, fromversion, toversion in toupgrade: |
748 for cube, fromversion, toversion in toupgrade: |
748 print('-> migration needed from %s to %s for %s' % (fromversion, toversion, cube)) |
749 print('-> migration needed from %s to %s for %s' % (fromversion, toversion, cube)) |
749 with mih.cnx: |
750 with mih.cnx: |
750 with mih.cnx.security_enabled(False, False): |
751 with mih.cnx.security_enabled(False, False): |
751 mih.migrate(vcconf, reversed(toupgrade), self.config) |
752 mih.migrate(vcconf, reversed(toupgrade), self.config) |
|
753 clear_cache(config, 'instance_md5_version') |
752 else: |
754 else: |
753 print('-> no data migration needed for instance %s.' % appid) |
755 print('-> no data migration needed for instance %s.' % appid) |
754 # rewrite main configuration file |
756 # rewrite main configuration file |
755 mih.rewrite_configuration() |
757 mih.rewrite_configuration() |
756 mih.shutdown() |
758 mih.shutdown() |