Beispiel #1
0
def recreate():
    "Recreates database tables (same as issuing 'drop' and then 'create')"
    print 'Connected to {}'.format(repr(db.engine.url))
    if prompt_bool("Are you sure you want to recreate the database?"):
        db.drop_all()
        db.create_all()
        print 'Database re-created'
Beispiel #2
0
def drop():
    "Drops database tables"
    print 'Connected to {}'.format(repr(db.engine.url))
    if prompt_bool("Are you sure you want to lose all your data"):
        db.drop_all()
        print 'Tables dropped'