server/migractions.py
branchstable
changeset 5019 72734c210836
parent 4951 7dc54e12c606
child 5034 4781870e97d9
--- a/server/migractions.py	Thu Mar 25 14:49:24 2010 +0100
+++ b/server/migractions.py	Thu Mar 25 15:08:27 2010 +0100
@@ -59,7 +59,6 @@
     def __init__(self, config, schema, interactive=True,
                  repo=None, cnx=None, verbosity=1, connect=True):
         MigrationHelper.__init__(self, config, interactive, verbosity)
-        # no config on shell to a remote instance
         if not interactive:
             assert cnx
             assert repo
@@ -67,10 +66,12 @@
             assert repo
             self._cnx = cnx
             self.repo = repo
-            if config is not None:
-                self.session.data['rebuild-infered'] = False
         elif connect:
             self.repo_connect()
+        # no config on shell to a remote instance
+        if config is not None:
+            self.session.data['rebuild-infered'] = False
+            self.repo.hm.call_hooks('server_maintenance', repo=self.repo)
         if not schema:
             schema = config.load_schema(expand_cubes=True)
         self.fs_schema = schema