kopia lustrzana https://github.com/glidernet/ogn-python
CLI: Add command db.drop
rodzic
6222e13225
commit
0d30b141c6
|
@ -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."""
|
||||
|
|
Ładowanie…
Reference in New Issue