projects
/
invirt/packages/invirt-database.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
0b37bfcc3ece8b5713e56468d83bd206e79ad78c
[invirt/packages/invirt-database.git]
/
invirt-database-tables
1
#!/usr/bin/env python
2
3
from invirt import database
4
import sys
5
6
def usage():
7
print >>sys.stderr, "Usage: %s [create|drop]" %(sys.argv[0],)
8
sys.exit(-1)
9
10
if len(sys.argv) == 1:
11
usage()
12
13
database.connect()
14
15
if sys.argv[1] == "create":
16
database.meta.create_all()
17
elif sys.argv[1] == "drop":
18
database.meta.drop_all()
19
else:
20
usage()