Fails with preceeding/existing migrations

See original GitHub issue

When 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:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

20reactions
dolezelcommented, Oct 16, 2018

It has to be run with double dashes for parameters to be passed through npm: e.g. npm run migrate up -- --no-check-order

4reactions
titarenkocommented, Nov 18, 2021

npm run migrate up -- --no-check-order – worth mentioning in docs

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fails with preceeding/existing migrations - node.js
It seems to be running (and failing) rather than skipping previously successful/complete migrations. I have tried with --no-check-order but I ...
Read more >
Migration troubleshooting in production - Prisma
To help with fixing a failed migration, Prisma provides the following commands for creating and executing a migration file: ... These commands are...
Read more >
Code First Migrations with an existing database - EF6
The following steps require the model to be in-sync with the database schema. Step 2: Enable Migrations. The next step is to enable...
Read more >
Known Issues for Oracle Database Migration Service
Solution: The table function needed by Oracle GoldenGate is available in 12.1.0.2 ... Downloading Data Pump log fails before migration is finished.
Read more >
Data migration service error codes - Google Support
You might encounter the following error codes when using the data migration service. ... Verify you completed the setup steps for existing Google...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found