Add db management script #804
Use pg_trgm in CaseSearch #789