Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.

Deploy blocked by local and product DB migrations out of sync #43

Closed
thedavidprice opened this issue Oct 12, 2020 · 3 comments
Closed

Comments

@thedavidprice
Copy link
Collaborator

@peterp Would it be possible to drop the Production DB _migrations table so we can deploy the latest code in main? Here's the most recent deploy log and error output:

https://app.netlify.com/sites/redwood-example-invoice/deploys/5f84cbd921618a000779e858

2:36:53 PM: Migrate database up... [started]
2:36:53 PM: $ /opt/build/repo/node_modules/.bin/prisma migrate up --experimental --create-db --auto-approve
2:36:55 PM: Error: Local and remote migrations are not in lockstep. We have migration 20200730175800-migration locally and 20200227093425 remotely at the same position in the history.
2:36:55 PM: error Command failed with exit code 1.
2:36:55 PM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
2:36:56 PM: Migrate database up... [failed]
2:36:56 PM: → Command failed with exit code 1: yarn prisma migrate up --experimental --create-db --auto-approve
2:36:56 PM: Command failed with exit code 1: yarn prisma migrate up --experimental --create-db --auto-approve

cc @dale-french

@peterp
Copy link
Collaborator

peterp commented Oct 18, 2020

@thedavidprice Yeah, go for it. The connection details are in Netlfiy.

@thedavidprice
Copy link
Collaborator Author

Ok, this is now done. It was messier than I expected and I ended up needing to:

  • blow out the DB and migrations and then reapply
  • manually re-seed (and add a user)

@dale-french The example app is now working, however, it does require manually entering the path /invoices after log in (didn't redirect for me) as well as for logout. And the Seed.js definitely is busted, but I'm not sure it's actually needed.

@dale-french
Copy link

@thedavidprice awesome - happy to help resolve the above if you want to create a couple issues 👍🏼

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants