Use mongodb driver directly?
See original GitHub issueHi @wzrdtales sorry if I’m asking something that has already been posted - but I didn’t find anything in the documentation or in the existing issues.
I wanted to ask if it is possible to use the mongodb driver directly? Like this for example:
exports.up = function (db) {
return db.driver.collectionName.find({id: 'ID'}).then((collection) => {
collection.property = 'newValue';
return collection.save();
});
}
The idea: I want to only update one property in one entry in the DB.
The reason: We have “base data” defined in our app that get’s initialized (and updated) with every release. This base data needs maintenance and it would be awesome if maintenance could be done with node-db-migrate
.
Thanks for answering!
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Start Developing with MongoDB — MongoDB Drivers
Docs Home → MongoDB Drivers. Start Developing with MongoDB. Connect your application to your database with one of our official libraries.
Read more >Add a MongoDB Driver — Start with Guides
Add the MongoDB .NET/C# driver using NuGet . Use MongoDB.Driver for all new projects. .
Read more >MongoDB Node Driver — Node.js
Welcome to the documentation site for the official MongoDB Node.js driver. You can add the driver to your application to work with MongoDB...
Read more >Connect via Your Application — MongoDB Atlas
The Connect dialog for a database deployment provides the details to connect to a database deployment with an application using a MongoDB driver....
Read more >Using MongoDB Node.js Driver to connect to an instance from ...
Hello I've read some key features about MongoDB stitch. I believe it allows us querying the MongoDB from the client's browser using HTTP....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Use it like this:
You could faced to migration terminating problem. Just close the dbDriver to avoid it.