Beispiel #1
0
def init_db():
    """
    Drops and re-creates the SQL schema
    Ran by: python manage.py init_db
    """
    db.drop_all()
    db.configure_mappers()
    db.create_all()
    db.session.commit()
Beispiel #2
0
def init_db():
    '''
    Drops and re-creates the SQL schema
    Ran by: python manage.py init_db
    '''
    db.drop_all()
    db.configure_mappers()
    db.create_all()
    db.session.commit()
    print('Initialized database')
Beispiel #3
0
 def tearDown(self):
     db.session.remove()
     db.drop_all()
Beispiel #4
0
def drop():
    '''Drops database tables'''
    if prompt_bool('Are you sure you want to lose all your data'):
        db.drop_all()
        print('Database tables dropped!')
Beispiel #5
0
def drop():
    "Drops database tables"
    if prompt_bool("Are you sure you want to lose all your data"):
        db.drop_all()
        print("Database tables dropped!")