def run_migrations(self, init=False):
        loglevel = logging.INFO
        if init:
            loglevel = logging.DEBUG
        else:
            if not os.path.exists(self.get_metadata_path('git')):
                raise exceptions.JirafsError(
                    u"{path} is not a valid ticket folder!".format(
                        path=self.path
                    )
                )

            if self.version < constants.CURRENT_REPO_VERSION:
                print(
                    u"Your ticket folder at {path} is out-of-date "
                    u"and is being automatically updated.".format(
                        path=self.path
                    )
                )
        while self.version < constants.CURRENT_REPO_VERSION:
            migrator = getattr(
                migrations,
                'migration_%s' % str(self.version + 1).zfill(4)
            )
            self.migrate(migrator, loglevel=loglevel, init=init)
dataset/ETHPy150Open coddingtonbear/jirafs/jirafs/ticketfolder.py/TicketFolder.run_migrations/original