Skip to content

Promises not removing the document in migration #39

Open
@wzrdtales

Description

@wzrdtales

I'm submitting a...

  • Bug report
  • Feature request
  • Question

Current behaviour

exports.down = function(db) {
  return db.dropTable("pets");
};

// Returns:
[INFO] Defaulting to running 1 down migration.
collection migrations
collection pets

The code above remove the collection pets but doesn't remove the document in the migration collection.

exports.down = function(db, callback) {
  db.dropTable("pets1", callback);
};

// Returns:
[INFO] Defaulting to running 1 down migration.
collection migrations
collection pets1
[INFO] Processed migration 20190704145216-yop2
[INFO] Done

The code above works as expected, it removes the collection pets1 and remove the right document in the migration collection.

Expected behaviour

It should remove the right document in the migration collection when it succeed.

Environment


[email protected]
[email protected]
Node version: v12.4.0
Platform:   Mac

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions