Пример #1
0
def clean_db():
    """ Clears records from all tables within database """
    db.drop_all(app=create_app())
    print("Tables dropped in database")
    db.create_all(app=create_app())
    print("Tables re-created in database")
Пример #2
0
def create_db():
    """ Created tables within database """
    db.create_all(app=create_app())
    print("Tables created in database")