MIGRATIONS
Prisma Migrations
Get Started
https://www.prisma.io/docs/concepts/components/prisma-migrate/get-started https://www.prisma.io/docs/concepts/components/prisma-migrate/migrate-development-production
Baseline Existing DBs (staging and prod)
https://www.prisma.io/docs/guides/database/developing-with-prisma-migrate/add-prisma-migrate-to-a-project#baseline-your-production-environment
cd applications/api-v2
yarn prisma migrate resolve --applied 20230110221201_init
yarn prisma migrate resolve --applied 20230110221244_functions_v2Sync Process
Steps to sync
Create an empty DB, and point
DATABASE_URLenv var to that one.Delete the
applications/api-v2/prisma/migrationspath and the*.tomllock.Run
yarn prisma migrate dev --name init, so that an init migration gets created.Switch back
DATABASE_URLtostagingDB.Run
yarn prisma migrate resolve --applied *****_init, so that we tell Prisma the creation migrations are ran.Run
yarn prisma migrate dev --name sync_staging, so we simulate a new migration and get the Drift message.
Staging
Pending Drift issues to resolve on staging after this PR updates:
Production
Pending Drift issues to resolve on prod after this PR updates:
Last updated
Was this helpful?

