@MigrateCommand.option('--rev-id', dest='rev_id', default=None,
                       help=('Specify a hardcoded revision id instead of '
                             'generating one'))
@MigrateCommand.option('--version-path', dest='version_path', default=None,
                       help=('Specify specific path from config for version '
                             'file'))
@MigrateCommand.option('--branch-label', dest='branch_label', default=None,
                       help=('Specify a branch label to apply to the new '
                             'revision'))
@MigrateCommand.option('--splice', dest='splice', action='store_true',
                       default=False,
                       help=('Allow a non-head revision as the "head" to '
                             'splice onto'))
@MigrateCommand.option('--head', dest='head', default='head',
                       help=('Specify head revision or <branchname>@head to '
                             'base new revision on'))
@MigrateCommand.option('--sql', dest='sql', action='store_true', default=False,
                       help=("Don't emit SQL to database - dump to standard "
                             "output instead"))
@MigrateCommand.option('-m', '--message', dest='message', default=None)
@MigrateCommand.option('-d', '--directory', dest='directory', default=None,
                       help=("migration script directory (default is "
                             "'migrations')"))
def migrate(directory=None, message=None, sql=False, head='head', splice=False,
            branch_label=None, version_path=None, rev_id=None):
    config = current_app.extensions['migrate'].migrate.get_config(
        directory, opts=['autogenerate'])
    if alembic_version >= (0, 7, 0):
        command.revision(config, message, autogenerate=True, sql=sql,
                         head=head, splice=splice, branch_label=branch_label,
                         version_path=version_path, rev_id=rev_id)
    else:
        command.revision(config, message, autogenerate=True, sql=sql)
Alias for 'revision --autogenerate'
dataset/ETHPy150Open miguelgrinberg/Flask-Migrate/flask_migrate/__init__.py/migrate