""" Drop the database (useful when testing) """ import click import glob from app.models.sql_factory import Base, engine @click.command() @click.option('-f', '--force', 'opt_force', is_flag=True, help='Actually drop the database') @click.pass_context def cli(ctx, opt_force): """ Drop the database """ if not opt_force: print('Will foolishly drop the database only if the --force flag is passed') else: print('Dropping the database...!') Base.metadata.drop_all(engine)