private static void CreatePackTable(IVistaDBDatabase gameDb) { var packSchema = gameDb.NewTable("Pack"); packSchema.AddColumn("id", VistaDBType.UniqueIdentifier); packSchema.DefineColumnAttributes("id", false, false, false, false, null, null); packSchema.AddColumn("name", VistaDBType.NVarChar, 200); packSchema.DefineColumnAttributes("name", false, false, false, false, null, null); packSchema.AddColumn("setId", VistaDBType.UniqueIdentifier); packSchema.DefineColumnAttributes("setId", false, false, false, false, null, null); packSchema.AddColumn("xml", VistaDBType.NText); using (var packTable = gameDb.CreateTable(packSchema, false, false)) { packTable.CreateIndex("PackPK", "id", true, true); packTable.CreateIndex("SetIX", "setId", false, false); packTable.CreateForeignKey("PackSetFK", "setId", "Set", VistaDBReferentialIntegrity.Cascade, VistaDBReferentialIntegrity.Cascade, null); } }