Exemple #1
0
def db(app, _create_db):
    with app.app_context():
        slq_alchemy_db.create_all()
    slq_alchemy_db.session.commit()
    yield slq_alchemy_db
    slq_alchemy_db.session.rollback()
    with app.app_context():
        slq_alchemy_db.drop_all()
def db_session(app):
    db.create_all()
    yield db.session
    db.drop_all()
Exemple #3
0
def create_table():
    db.create_all()
Exemple #4
0
 def create_db():
     """este comando inicializa banco de dados"""
     db.create_all()