X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-database.git/blobdiff_plain/1d0a39b8fa788b54834c9caa6576a6038a195d31..8877d60d7ea6bff078ae1a1ef97bc9313f46250d:/sipb-xen-database-tables diff --git a/sipb-xen-database-tables b/sipb-xen-database-tables index 537462a..0b37bfc 100755 --- a/sipb-xen-database-tables +++ b/sipb-xen-database-tables @@ -1,6 +1,6 @@ #!/usr/bin/env python -from sipb_xen_database import * +from invirt import database import sys def usage(): @@ -10,9 +10,11 @@ def usage(): if len(sys.argv) == 1: usage() -connect('postgres://sipb-xen@/sipb_xen') +database.connect() if sys.argv[1] == "create": - meta.create_all() + database.meta.create_all() +elif sys.argv[1] == "drop": + database.meta.drop_all() else: - meta.drop_all() + usage()