In the EnsureIndexCommand
code, we shouldn't drop any indexes. I think the original idea was to remove indexes that weren't needed any more. But if anyone has created their own custom indexes directly (e.g. to support external scripts or code), the command would delete them. We should change it to not delete any.
On branch db/8079
To test, add a mongo index on a collection, then run
paster ensure_index development.ini
Check log file for output. The index should still be there. Running with--clean
will make it be dropped.