Open
Description
I would like to bring down a single migration by name, but when I try to run a down migration by name the name appears to be ignored.
$ db-migrate down "/20161010235332-change-userID-to-unsigned" --migrations-dir ./api/db/migration --config ./api/db/migration/database.json --verbose
[INFO] Detected and using the projects local version of db-migrate. '/home/avejidah/programming/cea-exam/node_modules/db-migrate/index.js'
[INFO] Using dev settings: { driver: 'mysql',
user: '[REDACTED],
password: '******',
database: [REDACTED],
multipleStatements: true }
[INFO] require: db-migrate-mysql
[INFO] connecting
[INFO] connected
[INFO] creating table: migrations
[SQL] CREATE TABLE IF NOT EXISTS `migrations` (`id` INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL, `name` VARCHAR (255) NOT NULL, `run_on` DATETIME NOT NULL)
[INFO] loading migrations from database
[SQL] SELECT * FROM `migrations` ORDER BY run_on DESC, name DESC
[INFO] preparing to run down migration: 20161015004119-update-numberOfQuestions-in-objectives
[SQL] SET AUTOCOMMIT=0;
[SQL] START TRANSACTION;
[ERROR] Error: Cannot find module '/home/avejidah/programming/cea-exam/api/db/migration/20161015004119-update-numberOfQuestions-in-objectives'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Class.setup (/home/avejidah/programming/cea-exam/node_modules/db-migrate/lib/skeleton.js:157:12)
at /home/avejidah/programming/cea-exam/node_modules/db-migrate/lib/migrator.js:220:33
at tryCatcher (/home/avejidah/programming/cea-exam/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/avejidah/programming/cea-exam/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/home/avejidah/programming/cea-exam/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromise0 (/home/avejidah/programming/cea-exam/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/home/avejidah/programming/cea-exam/node_modules/bluebird/js/release/promise.js:691:18)
at Async._drainQueue (/home/avejidah/programming/cea-exam/node_modules/bluebird/js/release/async.js:138:16)
at Async._drainQueues (/home/avejidah/programming/cea-exam/node_modules/bluebird/js/release/async.js:148:10)
at Immediate.Async.drainQueues (/home/avejidah/programming/cea-exam/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:574:20)
at tryOnImmediate (timers.js:554:5)
Node version 6.6.0
npm version 3.10.8
db-migrate-0.10.0-beta.20
db-migrate-mysql-1.1.9
Thank you!
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.