Exemple #1
0
def show(directory=None, revision='head'):
    """Show the revision denoted by the given symbol."""
    if alembic_version >= (0, 7, 0):
        config = _get_config(directory)
        command.show(config, revision)
    else:
        raise RuntimeError('Alembic 0.7.0 or greater is required')
Exemple #2
0
 def show(self,
          directory=None,
          revision='head',
          **kwargs):  # pragma: no cover
     """Show the revision denoted by the given symbol."""
     config = _get_config(directory)
     command.show(config, revision)
Exemple #3
0
def show(context, directory="migrations", revision="head"):
    """Show the revision denoted by the given symbol."""
    if alembic_version >= (0, 7, 0):
        config = _get_config(directory)
        command.show(config, revision)
    else:
        raise RuntimeError("Alembic 0.7.0 or greater is required")
def show(directory=None, revision='head'):
    """Show the revision denoted by the given symbol."""
    if alembic_version >= (0, 7, 0):
        config = _get_config(directory)
        command.show(config, revision)
    else:
        raise RuntimeError('Alembic 0.7.0 or greater is required')
def show(context, directory="migrations", revision="head"):
    """显示详情信息"""
    if alembic_version >= (0, 7, 0):
        config = _get_config(directory)
        command.show(config, revision)
    else:
        raise RuntimeError("Alembic 0.7.0 or greater is required")
Exemple #6
0
def show(directory=None, revision="head"):
    """Show the revision denoted by the given symbol."""
    if alembic_version >= (0, 7, 0):
        config = current_app.extensions["migrate"].migrate.get_config(
            directory)
        command.show(config, revision)
    else:
        raise RuntimeError("Alembic 0.7.0 or greater is required")
Exemple #7
0
def show(directory=None, _revision='head'):
    """Show the revision denoted by the given symbol."""
    if alembic_version >= (0, 7, 0):
        app = current_app()
        config = app.extra['migrate'].migrate.get_config(directory)
        command.show(config, _revision)
    else:
        raise RuntimeError('Alembic 0.7.0 or greater is required')
 def show(context, directory='migrations', revision='head'):
     """Show the revision denoted by the given symbol."""
     from app import create_app
     with create_app().app_context():
         if alembic_version >= (0, 7, 0):
             config = _get_config(directory)
             command.show(config, revision)
         else:
             raise RuntimeError('Alembic 0.7.0 or greater is required')
 def show(context, directory='migrations', revision='head'):
     """Show the revision denoted by the given symbol."""
     from app import create_app
     with create_app().app_context():
         if alembic_version >= (0, 7, 0):
             config = _get_config(directory)
             command.show(config, revision)
         else:
             raise RuntimeError('Alembic 0.7.0 or greater is required')
Exemple #10
0
def cli_db_show(revisions):
    """
    Show the revision(s) denoted by the given symbol.
    """
    alembic_cfg = AlembicConfig("alembic.ini")
    alembic_cfg.set_main_option("script_location",
                                str(Path() / "db_migrations"))
    command.show(
        config=alembic_cfg,
        rev=revisions,
    )
Exemple #11
0
def show(config, revision: str):
    """Show the revision denoted by the given symbol."""

    bot = Bot(config)

    directory = os.path.join('yui', 'models', 'migrations')
    c = Config(os.path.join(directory, 'alembic.ini'))
    c.set_main_option('script_location', directory)
    c.set_main_option('sqlalchemy.url', bot.config.DATABASE_URL)
    c.attributes['Base'] = bot.orm_base

    command.show(c, revision)
Exemple #12
0
def show(directory=None, revision='head'):
    """Show the revision denoted by the given symbol."""
    config = migrate_manager.migrate_config.migrate.get_config(directory)
    command.show(config, revision)
Exemple #13
0
def show(opt, config):
    command.show(config, opt["<revisions>"] or "head")
Exemple #14
0
def show(context, directory="migrations", revision="head"):
    """显示数据库更改详情信息"""
    config = _get_config(directory)
    command.show(config, revision)
Exemple #15
0
def show(directory=None, revision='head'):
    """Show the revision denoted by the given symbol."""
    config = current_app.extensions['migrate'].migrate.get_config(directory)
    command.show(config, revision)
Exemple #16
0
    def show(self, revision: str = 'head') -> t.Any:
        config = self.configuration.to_alembic_config()

        return command.show(config, revision)
Exemple #17
0
def show(opt, config):
    command.show(config, opt["<revisions>"] or "head")
Exemple #18
0
 def show(self, revision):
     alembic_cmd.show(self.cfg, revision)
     return self.message()
def show(app, rev):
    """Show the revision(s) denoted by the given symbol."""
    alembic.show(_get_config(app), rev=rev)
def show(app, rev):
    """Show the revision(s) denoted by the given symbol."""
    alembic.show(_get_config(app), rev=rev)
 def show(self, directory=None, revision='head', **kwargs):  # pragma: no cover
     """Show the revision denoted by the given symbol."""
     config = _get_config(directory)
     command.show(config, revision)
Exemple #22
0
 def show(self, revision):
     alembic_cmd.show(self.cfg, revision)
Exemple #23
0
def show(directory=None, revision="head"):
    from alembic import command
    """Show the revision denoted by the given symbol."""
    config = get_config(directory)
    command.show(config, revision)
Exemple #24
0
def show(directory, revision):
    """Show the revision denoted by the given symbol."""
    config = get_config(directory)
    command.show(config, revision)