CLI: Add command db.drop

pull/29/head
Fabian P. Schmidt 2016-01-12 18:36:08 +01:00
rodzic 6222e13225
commit 0d30b141c6
1 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -20,6 +20,16 @@ def init():
print("Done.")
@manager.command
def drop(sure='n'):
"""Drop all tables."""
if sure == 'y':
Base.metadata.drop_all(engine)
print('Dropped all tables.')
else:
print("Add argument '--sure y' to drop all tables.")
@manager.command
def import_ddb():
"""Import registered devices from the DDB."""