When to run migration in production with Turborepo?
Hey there
in the official Prisma-Turborepo guide (https://www.prisma.io/docs/guides/turborepo#1-create-your-monorepo-using-turborepo), it says to "ensure that db:generate is always executed before running dev or build. Additionally, make sure both db:deploy and db:generate are executed before db:build." Yet, in the example code given, we see only
If
...or do we run this independently using our build environment like
db:generate as a dependency of build.If
db:deploy (prisma migrate deploy) needs to run prior to the build command, do we run this explicitly with Turbo (specified in the config)?...or do we run this independently using our build environment like
turbo db:deploy && turbo build --filter=api? Also, I am assuming the deploy script always go before the generate script, but I am unsure how to order these in the execution chain, or if that's even possible. I believe these scripts might execute simultaneously?