server/__init__.py
changeset 9556 12ee310541bb
parent 9555 370a7c40864f
child 9790 0872ac2a1db0
equal deleted inserted replaced
9555:370a7c40864f 9556:12ee310541bb
   281     repo.shutdown()
   281     repo.shutdown()
   282     # reloging using the admin user
   282     # reloging using the admin user
   283     config._cubes = None # avoid assertion error
   283     config._cubes = None # avoid assertion error
   284     repo = get_repository(config=config)
   284     repo = get_repository(config=config)
   285     with connect(repo, login, password=pwd) as cnx:
   285     with connect(repo, login, password=pwd) as cnx:
   286         repo.system_source.eid = ssource.eid # redo this manually
   286         with cnx.security_enabled(False, False):
   287         handler = config.migration_handler(schema, interactive=False,
   287             repo.system_source.eid = ssource.eid # redo this manually
   288                                            cnx=cnx, repo=repo)
   288             handler = config.migration_handler(schema, interactive=False,
   289         # install additional driver specific sql files
   289                                                cnx=cnx, repo=repo)
   290         handler.cmd_install_custom_sql_scripts()
   290             # install additional driver specific sql files
   291         for cube in reversed(config.cubes()):
   291             handler.cmd_install_custom_sql_scripts()
   292             handler.cmd_install_custom_sql_scripts(cube)
   292             for cube in reversed(config.cubes()):
   293         # serialize the schema
   293                 handler.cmd_install_custom_sql_scripts(cube)
   294         initialize_schema(config, schema, handler)
   294             # serialize the schema
   295         # yoo !
   295             initialize_schema(config, schema, handler)
   296         cnx.commit()
   296             # yoo !
   297         repo.system_source.init_creating()
   297             cnx.commit()
   298         cnx.commit()
   298             repo.system_source.init_creating()
       
   299             cnx.commit()
   299     repo.shutdown()
   300     repo.shutdown()
   300     # restore initial configuration
   301     # restore initial configuration
   301     config.creating = False
   302     config.creating = False
   302     config.consider_user_state = True
   303     config.consider_user_state = True
   303     # (drop instance attribute to get back to class attribute)
   304     # (drop instance attribute to get back to class attribute)