#!/usr/bin/env python

from invirt import database
import sys

def usage():
    print >>sys.stderr, "Usage: %s [create|drop]" %(sys.argv[0],)
    sys.exit(-1)

if len(sys.argv) == 1:
    usage()

database.connect()

if sys.argv[1] == "create":
    database.meta.create_all()
elif sys.argv[1] == "drop":
    database.meta.drop_all()
else:
    usage()
