Skip to content

How to make more complex queries? #261

Open
@thokari

Description

@thokari

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! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions