예제 #1
0
    def handle_noargs(self, **options):
        config = siteconfig.load_site_config()
        db_buildversion = config.get('BUILDVERSION', None)

        if db_buildversion and db_buildversion < DEFAULT_POOTLE_BUILDVERSION:
            from pootle_misc.upgrade.schema import staggered_update

            logging.info(
                'Upgrading Pootle database from schema version '
                '%d to %d', db_buildversion, DEFAULT_POOTLE_BUILDVERSION)
            staggered_update(db_buildversion)
            logging.info('Database upgrade done.')
        elif db_buildversion:
            logging.info('No database upgrades required.')

        if db_buildversion:
            new_buildversion = max(db_buildversion,
                                   DEFAULT_POOTLE_BUILDVERSION)
            logging.info('Current schema version: %d', new_buildversion)
        else:
            # Oh, the admin tried to run updatedb but there is no BUILDVERSION
            # recorded in its Pootle installation. That means it's not a legacy
            # installation.
            logging.info('Your installation is newer than Pootle 2.5.\n'
                         'You do not need to run this.')

        logging.info('THIS UPGRADE SCRIPT HAS BEEN DEPRECATED!')
        logging.info('If you are trying to upgrade Pootle from version 2.5\n'
                     'or older, please read the upgrade instructions at\n'
                     'http://docs.translatehouse.org/projects/pootle/en/'
                     'latest/server/upgrading.html')
예제 #2
0
파일: updatedb.py 프로젝트: AmesianX/pootle
    def handle_noargs(self, **options):
        db_buildversion = get_pootle_build()

        if db_buildversion and db_buildversion < DEFAULT_POOTLE_BUILDVERSION:
            from pootle_misc.upgrade.schema import staggered_update

            logging.info('Upgrading Pootle database from schema version '
                         '%d to %d', db_buildversion,
                         DEFAULT_POOTLE_BUILDVERSION)
            staggered_update(db_buildversion)
            logging.info('Database upgrade done.')
        elif db_buildversion and db_buildversion > DEFAULT_POOTLE_BUILDVERSION:
            logging.info('Your installation is newer than Pootle 2.5.\n'
                         'You do not need to run this.')
        elif db_buildversion:
            logging.info('No database upgrades required.')

        if db_buildversion:
            new_buildversion = max(db_buildversion,
                                   DEFAULT_POOTLE_BUILDVERSION)
            logging.info('Current schema version: %d', new_buildversion)

        logging.info('THIS UPGRADE SCRIPT HAS BEEN DEPRECATED!')
        logging.info('If you are trying to upgrade Pootle from version 2.5\n'
                     'or older, please read the upgrade instructions at\n'
                     'http://docs.translatehouse.org/projects/pootle/en/'
                     'latest/server/upgrading.html')
예제 #3
0
    def handle_noargs(self, **options):
        config = siteconfig.load_site_config()
        db_buildversion = config.get("BUILDVERSION", None)

        if db_buildversion and db_buildversion < DEFAULT_POOTLE_BUILDVERSION:
            logging.info(
                "Upgrading Pootle database from schema version " "%d to %d",
                db_buildversion,
                DEFAULT_POOTLE_BUILDVERSION,
            )

            from pootle_misc.upgrade.schema import staggered_update

            staggered_update(db_buildversion)

            logging.info("Database upgrade done.")
        elif db_buildversion:
            logging.info("No database upgrades required.")

        if db_buildversion:
            new_buildversion = max(db_buildversion, DEFAULT_POOTLE_BUILDVERSION)
            logging.info("Current schema version: %d", new_buildversion)
        else:
            # Oh, the admin tried to run updatedb but there is no
            # BUILDVERSION recorded in its Pootle installation. That means
            # it's not a legacy installation.
            logging.info("Your installation is newer than Pootle 2.5.\n" "You do not need to run this.")

        logging.info("THIS UPGRADE SCRIPT HAS BEEN DEPRECATED!")
        logging.info(
            "If you are trying to upgrade Pootle from version 2.5\n"
            "or older, please read the upgrade instructions at\n"
            "http://docs.translatehouse.org/projects/pootle/en/latest/server/upgrading.html"
        )
예제 #4
0
    def handle_noargs(self, **options):
        config = siteconfig.load_site_config()
        db_buildversion = config.get('BUILDVERSION', None)

        if db_buildversion and db_buildversion < DEFAULT_POOTLE_BUILDVERSION:
            from pootle_misc.upgrade.schema import staggered_update

            logging.info('Upgrading Pootle database from schema version '
                         '%d to %d', db_buildversion,
                         DEFAULT_POOTLE_BUILDVERSION)
            staggered_update(db_buildversion)
            logging.info('Database upgrade done.')
        elif db_buildversion:
            logging.info('No database upgrades required.')

        if db_buildversion:
            new_buildversion = max(db_buildversion,
                                   DEFAULT_POOTLE_BUILDVERSION)
            logging.info('Current schema version: %d', new_buildversion)
        else:
            # Oh, the admin tried to run updatedb but there is no BUILDVERSION
            # recorded in its Pootle installation. That means it's not a legacy
            # installation.
            logging.info('Your installation is newer than Pootle 2.5.\n'
                         'You do not need to run this.')

        logging.info('THIS UPGRADE SCRIPT HAS BEEN DEPRECATED!')
        logging.info('If you are trying to upgrade Pootle from version 2.5\n'
                     'or older, please read the upgrade instructions at\n'
                     'http://docs.translatehouse.org/projects/pootle/en/'
                     'latest/server/upgrading.html'))
예제 #5
0
    def handle_noargs(self, **options):
        db_buildversion = get_pootle_build()

        if db_buildversion and db_buildversion < DEFAULT_POOTLE_BUILDVERSION:
            from pootle_misc.upgrade.schema import staggered_update

            logging.info(
                'Upgrading Pootle database from schema version '
                '%d to %d', db_buildversion, DEFAULT_POOTLE_BUILDVERSION)
            staggered_update(db_buildversion)
            logging.info('Database upgrade done.')
        elif db_buildversion and db_buildversion > DEFAULT_POOTLE_BUILDVERSION:
            logging.info('Your installation is newer than Pootle 2.5.\n'
                         'You do not need to run this.')
        elif db_buildversion:
            logging.info('No database upgrades required.')

        if db_buildversion:
            new_buildversion = max(db_buildversion,
                                   DEFAULT_POOTLE_BUILDVERSION)
            logging.info('Current schema version: %d', new_buildversion)

        logging.info('THIS UPGRADE SCRIPT HAS BEEN DEPRECATED!')
        logging.info('If you are trying to upgrade Pootle from version 2.5\n'
                     'or older, please read the upgrade instructions at\n'
                     'http://docs.translatehouse.org/projects/pootle/en/'
                     'latest/server/upgrading.html')