Fails with preceeding/existing migrations
See original GitHub issueWhen creating a second migration and attempting to migrate up to add it, the task fails because the first migration was already run. It seems to be running (and failing) rather than skipping previously successful/complete migrations.
I tried with the --no-check-order option, but got the same results.
I’ve got two migrations currently, one was created and run successfully a while ago. The second was created recently. When running the second, it sees the first and fails. Checking the pgmigrate database table does in fact show the first/initial migration there. Timestamps match.
I was hesitant to file an issue because this seems like user-error, but searching StackOverflow and the web doesn’t turn up similar findings. Am I doing something wrong, or is this a legit bug?
> pg-migrate up
> Rolling back attempted migration ...
Error: Not run migration 1491784040558_create-table-users is preceding already run migration 1491784040558_create-table-users.js
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Related StackOverflow Question
It has to be run with double dashes for parameters to be passed through npm: e.g.
npm run migrate up -- --no-check-ordernpm run migrate up -- --no-check-order– worth mentioning in docs