Hey guys, as I understand prisma migrate files wor...
# prisma-migrate
ö
Hey guys, as I understand prisma migrate files working in change based way. I'm using github actions for cd, so everytime i want to make a change on database i have to add a one more migration file to the repo. is there a way to keep migration in a single file?
j
So what you what to do is only run migrate if there is a change (a new migration)?
ö
No, I want to keep migration in a single migration file (final state of the migration) in a continuous way. Let's say, I made changes on database over time, created multiple migration files and pushed them on the repo for the deployment. Then someone clones this repo and migrate to their database but instead of migrating only the final state of migration, they'll apply all the accumulated migrations.
👍 1
j
I’m curious, what is the problem you’re facing with
apply all the accumulated migrations.
?
ö
Actually there is no problem with that except it looks complicated. Let's say, I created a column pushed it to repo and later i changed my mind and removed it. So there will be 2 unnecessary migration files in the repo.
👍 1
j
So the ability to “squash” all migrations once in while would help you here I think?
ö
I mean, as far as I know multiple migration files help for safer changes but i think there should be an option to squash migration files to it's final state seamlessly and able to work in a continuous way after ensuring that the database is working without any problem.