예제 #1
0
def db():
    with app.app_context():
        from server.db import db
        db.session.close()
        db.drop_all()
        db.create_all()
        yield db
예제 #2
0
def db():
    with app.app_context():
        from server.db import db
        db.session.close()
        db.drop_all()
        db.create_all()
        yield db
예제 #3
0
파일: manage.py 프로젝트: tsclay/managem
def create_db():
    db.drop_all()
    db.create_all()
    db.session.commit()
예제 #4
0
 def tearDown(self):
     """
     Deletes created tables and closes the session instance
     """
     db.session.remove()
     db.drop_all(app=app)
예제 #5
0
def drop_db():
	db.drop_all()
예제 #6
0
def drop_db():
    db.drop_all()