added script for ensure_indexes