def run_drop(args):
    """Drop the database"""
    dbname = bigchaindb.config['database']['name']

    if not args.yes:
        response = input_on_stderr('Do you want to drop `{}` database? [y/n]: '.format(dbname))
        if response != 'y':
            return

    conn = backend.connect()
    dbname = bigchaindb.config['database']['name']
    try:
        schema.drop_database(conn, dbname)
    except DatabaseDoesNotExist:
        print("Cannot drop '{name}'. The database does not exist.".format(name=dbname), file=sys.stderr)
def run_drop ( args ) : dbname = bigchaindb . config [ 'database' ] [ 'name' ] if not args . yes : response = input_on_stderr ( 'Do you want to drop `{}` database? [y/n]: ' . format ( dbname ) ) if response != 'y' : return conn = backend . connect ( ) dbname = bigchaindb . config [ 'database' ] [ 'name' ] try : schema . drop_database ( conn , dbname ) except DatabaseDoesNotExist : print ( "Cannot drop '{name}'. The database does not exist." . format ( name = dbname ) , file = sys . stderr )
Drop the database