This is a good start on bug #8212.  It just needs the actual database setup added.  I think I might do that in a separate script.