예제 #1
0
def create_database():
    print('Creating database...')
    Session.remove()
    Base.metadata.create_all(Engine)
    Session.remove()
    print('Database created successfully.')
예제 #2
0
def drop_database():
    print('Dropping database...')
    Session.remove()
    Base.metadata.drop_all(Engine, checkfirst=False)
    Session.remove()
    print('Database dropped successfully.')