To generate code for the vistrails database interaction automatically,
you will need to run generate.py with a directory of specs files.

Usage: python generate.py -v <version> [-a] [-m] [-n] [-p] [-s] [-d <dir>] [-x] [-b <dir>] 
    -a            generate all database information (-p -s -x)
    -m            make all directories
    -n            do not change current version
    -p            generate python domain classes
    -s            generate sql schema and persistence classes
    -d <dir>  versions directory
    -x            generate xml schema and persistence classes
    -v <version>  vistrail version tag
    -b <dir>  base directory

If you have not created any directory structure for the version,
common usage would be something like

python generate.py -v 0.6.0 -m -a -n

with -n depending on whether you wish to change the current version or not.

In the specs file, you can create indexes using the index attribute
for a property.  You can specify multiple indexes by delimiting them
with spaces.  You can specify a composite index by separating the
fields by a colon.  Finally, you can specify that an index is not 1-1
with '!' as the starting character; this allows us to ignore KeyErrors
on the deletes from that dictionary.