I have a valid base, in one collection there is a field

connectId : {type : String, index: true, unique: true},

I need to remove the uniqueness attribute for it. How to do it?

connectId : {type : String, index: true},

thank

    1 answer 1

    Look in the indexes of the collection, apparently you added an index of something like:

     db.collection.createIndex( { "a.loc": 1 }, { unique: true } ) 

    The documentation is here . P.S. If you use robo 3T as a database manager, then you can expand the collection and edit the indexes.