Inflearn brand logo image

Inflearn Community Q&A

No author

This post's author information has been deleted.

mongoDB from basics to practice (feat. Node.js)

Unique Index

mongodb connect

Written on

·

289

0

    await mongoose.connect(MONGO_URI, {useNewUrlParser : true , useUnifiedTopology:true , useCreateIndex:true});

 

 useCreateIndex:true}

이부분을 추가시 mongodb 6.0이상 버전에서

MongoParseError: option usecreateindex is not supported

위와 같은 에러가 발생합니다.

데이터 엔지니어링javascriptawsmongodbnodejsDBMS/RDBMSrest-api

Answer 1

0

sihoon님의 프로필 이미지
sihoon
Instructor

useCreateIndex: true 부분이 deprecate 되어서 코드에서 제외시켜주시면 됩니다

해당 코드를 빼면 unique index가 안되는거 같습니다!

No author

This post's author information has been deleted.

Ask a question