Hello, when I run test for migration, it looks like nothing is happening or waitining for something to happen. I am not sure whether my connection string is correct. I have copied it from env and it is "“mongodb+srv://m220student:m220password@mflix-bsjyr.mongodb.net/test”. I have applied the predicate properly. I have used the predicate in the atlas and is retrieving correct documents. But when I run “movie-last-updated-migration.js”, it says Found 0 documents to update. I am not sure whether it is successful in finding correct collection.

Please help Thanks.

You are right. When you are using the connection string like this: “mongodb+srv://m220student:m220password@mflix-bsjyr.mongodb.net/test”, it will connect to test database, so the collection movies won’t make sense here.
One thing you can do is, change the below line :

    const mflix = client.db(process.env.MFLIX_NS)


   const mflix = client.db("sample_mflix")


Thanks. Its connected to the collection