Hi, I'm busy using the new prisma migrate. I was w...
# orm-help
p
Hi, I'm busy using the new prisma migrate. I was wondering if anyone has a solution for automating running migrations in CI (github actions) or on vercel during deployment
t
Hi! This is what
prisma migrate deploy --preview-feature
is designed for. We're interested in your feedback if it doesn't work for your use-case 🙂
p
yep I found that shortly after asking here. thanks
would be nice to have a github action setup in the marketplace though
💯 1
j
I like the idea, what would this action help you with? Curious to get the motivation 😃 Do you / did you use something similar before?
p
Migrate api has changed considerably and it will probably keep changing. It's just a nice touch to have a github action that is maintained alongside prisma cli and we can simply update the version in yml file when upgrading, rather than figuring out what has changed. Renovate bot can even update it for us. The other reason is that there could be some optimal caching etc added to the action to only run it if the schema file changed etc.
👍 1
j
Would you use it for CI (Continuous Integration) only or for CD (Continuous Deployment) as well?
In CI I guess you would use a database service / docker instance and in CD a remote database?
p
Only for CI with a docker pg container
👍 1
but thats because we dont do CD within GH actions, as we deploy on vercel. But I can see how others could find it useful for both
👍 1