سؤال

I have a collection Task in which I have a field title as unique = True, but due to latest requirement this unique = True has to be removed, i.e. it has to be set as False.

Is there a way to do this ? Ofcourse I don't want to drop my collection.

هل كانت مفيدة؟

المحلول

You must update your model code and remove index from collection. See specification: http://docs.mongodb.org/manual/reference/method/db.collection.dropIndex/. Do not forgot make backup.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top