Beispiel #1
0
def db_corner(app_corner):
    db.app = app_corner
    with app_corner.app_context():
        db.create_all('__all__', app_corner)


    yield db

    db.session.remove()
    db.drop_all()
Beispiel #2
0
def initdb():
    db.drop_all()
    db.create_all()
Beispiel #3
0
def drop_db():
    with app.test_request_context():
        db.drop_all()
Beispiel #4
0
 def tearDown(self):
     with self.get_context():
         db.drop_all()
Beispiel #5
0
def dropall():
    if prompt_bool("Are you sure ? You will lose all your data !"):
        db.drop_all()
Beispiel #6
0
def initdb():
    app = make_application()
    db.app = app
    db.drop_all()
    db.create_all()
    logger.info("Database reseted")
Beispiel #7
0
 def run(self):
     db.drop_all()
Beispiel #8
0
def drop_db():
    '''drop database'''
    db.drop_all()
    print 'Drop database success.'
Beispiel #9
0
def drop_all():
    db.drop_all()