예제 #1
0
파일: manager.py 프로젝트: nezaj/mongoose
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'
예제 #2
0
파일: manager.py 프로젝트: nezaj/mongoose
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'