erich_fromm
erich_fromm
Explore posts from servers
PPrisma
Created by erich_fromm on 7/2/2024 in #help-and-questions
What’s a good strategy for migration if downtime is not a problem?
I was thinking to establish something like this in my app. 1. Run npx prisma migrate dev on side branches: • Ensure migrations are always additive (expansion schema). 2. Prepare data migration scripts if needed. 3. Squash migrations before merging to main. 4. Deployment to production: • Start maintenance mode. • Apply migrations. • Run migration scripts if needed. • Verify deployment. • Apply contraction migration. • Verify deployment. • Stop maintenance mode. 5. Merge release branch back to main with contraction migration. How does it sound?
2 replies