@MigrateCommand.option('-d', '--directory', dest='directory', default=None,
                       help=("migration script directory (default is "
                             "'migrations')"))
@MigrateCommand.option('--multidb', dest='multidb', action='store_true',
                       default=False,
                       help=("Multiple databases migraton (default is "
                             "False)"))
def init(directory=None, multidb=False):
    if directory is None:
        directory = current_app.extensions['migrate'].directory
    config = Config()
    config.set_main_option('script_location', directory)
    config.config_file_name = os.path.join(directory, 'alembic.ini')
    config = current_app.extensions['migrate'].\
        migrate.call_configure_callbacks(config)
    if multidb:
        command.init(config, directory, 'flask-multidb')
    else:
        command.init(config, directory, 'flask')
Generates a new migration
dataset/ETHPy150Open miguelgrinberg/Flask-Migrate/flask_migrate/__init__.py/init