Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

[Meta] Known Migrations that behave unexpectedly #2018

Closed
19 of 20 tasks
marktani opened this issue Mar 5, 2018 · 8 comments
Closed
19 of 20 tasks

[Meta] Known Migrations that behave unexpectedly #2018

marktani opened this issue Mar 5, 2018 · 8 comments

Comments

@marktani
Copy link
Contributor

marktani commented Mar 5, 2018

@robbyemmert
Copy link

I just have to say, Prisma is a really ambitious project, and you all get a lot of credit. Automated migrations are probably the most daunting thing about building a framework like this, but keep going, I love it!

In the mean time, do you have any recommendations on how to roll back a failed migration, or is there a recommended way to write a manual migration?

Thanks!

@Weakky
Copy link
Contributor

Weakky commented Apr 26, 2018

Meanwhile all these issues get solved, I advise people to never deploy without backing-up your data before, as once it happens it seems like there's no way to get out of it without prisma reset and changing the stage.

Adding

"deploy": "prisma export -p database/seed.zip && prisma deploy"

to your scripts section in the package.json is a safe work-around for now, allowing to prisma import or prisma seed whenever you have to reset prisma.

@marktani
Copy link
Contributor Author

marktani commented Apr 26, 2018

Hey @robbyemmert, thanks a lot for your kind words! 🙂

In the mean time, do you have any recommendations on how to roll back a failed migration, or is there a recommended way to write a manual migration?

All migrations are kept in the internal database (can be called graphcool or prisma). There, a Migration table keeps track of all migrations.

You can cross-reference the migrations in there with the actual database schema deployed for a specific service.

@Weakky, backing up your data is always a good idea 🙂But you can always patch things up manually on the database level to restore API access, and the data is not affected.

@Minishlink
Copy link

Hello @marktani, I'm considering prisma for new projects, and I have to say that I'm very impressed by your work, thanks and congratulations! :)

Migration is a blocker for production though, do you have documented strategies on how to workaround possible failures when deploying with a change of schema? Or does it basically boils down to do the database migration manually and prisma will adapt automatically?

@terion-name
Copy link

Another stuck to the list #2490

@stale
Copy link

stale bot commented Jun 27, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@marktani
Copy link
Contributor Author

Closing this, as all known issues have been fixed & released. Especially for 1.18.1, we fixed a bunch of them again.

@tanujdoshi
Copy link

Closing this, as all known issues have been fixed & released. Especially for 1.18.1, we fixed a bunch of them again.

hello , please can you help me to solve this #4625

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

No branches or pull requests

8 participants