akd_io
akd_io
TTCTheo's Typesafe Cult
Created by akd_io on 8/15/2023 in #questions
Automated Migration Testing
Hey everyone. I'm building a new project using create-t3-app, where 24/7 uptime is really important. Therefore I want to be able to test my migrations. Have any of you tried to do automated migration testing? I'm imagining a workflow that'll look something like this: - Seed database - Run 1st migration - Run 1st migration tests - Run 2nd migration - Run 2nd migration tests - Run 3rd migration - Run 3rd migration tests Maybe with extra seeding after every migration. I mean, just setting up the database at the penultimate migration, seeding it, and testing the last migration seems hard. The Prisma types are locked into the current version, so seeding the database according to the previous schema gives errors, so I have to jump Git versions.
3 replies