Exemple #1
0
    def take_action(self, parsed_args):
        # TODO: Support specifying version
        utils.read_config('moniker-central')

        url = cfg.CONF.database_connection

        if not os.path.exists(REPOSITORY):
            raise Exception('Migration Respository Not Found')

        LOG.info('Attempting to synchronize database')
        versioning_api.upgrade(url=url, repository=REPOSITORY, version=None)
        LOG.info('Database synchronized sucessfully')
Exemple #2
0
    def take_action(self, parsed_args):
        # TODO: Support specifying version
        utils.read_config('moniker-central')

        url = cfg.CONF.database_connection

        if not os.path.exists(REPOSITORY):
            raise Exception('Migration Respository Not Found')

        LOG.info('Attempting to synchronize database')
        versioning_api.upgrade(url=url, repository=REPOSITORY,
                               version=None)
        LOG.info('Database synchronized sucessfully')
Exemple #3
0
    def take_action(self, parsed_args):
        utils.read_config('moniker-central')

        url = cfg.CONF.database_connection

        if not os.path.exists(REPOSITORY):
            raise Exception('Migration Respository Not Found')

        try:
            LOG.info('Attempting to initialize database')
            versioning_api.version_control(url=url, repository=REPOSITORY)
            LOG.info('Database initialized sucessfully')
        except DatabaseAlreadyControlledError:
            raise Exception('Database already initialized')
Exemple #4
0
    def take_action(self, parsed_args):
        utils.read_config('moniker-central')

        url = cfg.CONF.database_connection

        if not os.path.exists(REPOSITORY):
            raise Exception('Migration Respository Not Found')

        try:
            LOG.info('Attempting to initialize database')
            versioning_api.version_control(url=url, repository=REPOSITORY)
            LOG.info('Database initialized sucessfully')
        except DatabaseAlreadyControlledError:
            raise Exception('Database already initialized')