Cole Voss
07/07/2021, 6:48 PMinit and all other migrations now have a later dated migration folder name. It seems to have deployed ok in our staging environment, but locally it causes issues. I am thinking about changing the name of the migration folder to a later date, and then manually updating the _prisma_migration.migration_name to the new name in the database. Does anyone see any glaring issues with that? Thanks!Ryan
07/08/2021, 5:03 AMjanpio
janpio
Alberto Perdomo
tom
07/08/2021, 3:41 PMmigrate dev will do that), and then use migrate resolve --applied <the-new-migration-name> on your production database — this will mark the migration as already applied with its new name in the migrations table, and next time you deploy it won't be run.Cole Voss
07/08/2021, 4:21 PMmigrate resolve … since our whole pipeline is automated and runs migrations on start up. I would either have to proxy to my DB and mock our dev env to be like our stage/prod environment and then run it locally against that, or introduce some sort of one off script to run on a deployment and then remove it immediately. That said, I will look further into the resolve CLI to see if I can leverage it in the future.Cole Voss
07/08/2021, 4:24 PM#!/bin/bash
npm run migrate:status # prisma migrate status
# Run prisma migrations in prod mode
npm run migrate:prod # prisma migrate deploy
# Run database seed
npm run prisma:seed # prisma db seed --preview-feature (not in preview any more?)
# Execute the first argument when running from a shell
# Example: Running the app after running migrations
# > docker-entrypoint.sh node ./build/index.js
exec "$@"