Guys, does anybody has a flow of how to work with ...
# orm-help
p
Guys, does anybody has a flow of how to work with migrations when using prisma?
h
Migrations are currently being specced out
p
Yeah, I saw the RFC, but I’m particularly interested in how people do that now
h
most of the things are handled by the prisma datamodel. For things like making a non required type required, it needs some manual work
p
yeah, but how about reverting the changes?
like revert changes done in last
deploy
h
you can use git and get back to the old state of the datamodel and run prisma deploy
a
Is that all though? What if you made a column nullable and now your table contains lots of nulls in that column?
Same goes for deleting a non-nullable column
h
What if you made a column nullable and now your table contains lots of nulls in that column
For this one, we are going to introduce population of the field using the default directive but right you have to manually add the default value
Same goes for deleting a non-nullable column
For this, you will need to revert a backup since we are not exporting the deleted column.