added missing foreign key, search and ordering indexes.