db-migrate / db-migrate/node-db-migrate
How to make more complex queries?
- Dominant language
- JavaScript
- Stars
- 2.3k
- Forks
- 361
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I want to completely change the structure of my database (mongodb), so the four methods provided by the API will not suffice. How do I use the mongodb API from within migrations?
I am currently stuck with this:
```
exports.up = (db, callback) ->
db.connection._db.collection('users').find().toArray((err, arr) ->
console.log err
console.log arr
callback()
)
```
Which yields:
```
{ [MongoError: Connection Closed By Application] name: 'MongoError' }
null
```
##
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/11880648-how-to-make-more-complex-queries?utm_campaign=plugin&utm_content=tracker%2F73887&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F73887&utm_medium=issues&utm_source=github).
Contributor guide
Assessment
This issue has not been assessed yet.