Executing database migrations on Vercel
now planetscale is removing their free tier, i'm looking to move, which probably means i gotta use migrations now
i'm using next so my build command is just
next build
my assumption is that i would just change this to next build && tsx ./migrate.ts
is this the go-to for running migrations on serverless? is it possible to run migrations inside a transaction so if anything fails, the schema doesn't remain in a broken state?1 Reply
alright this seems to work really nicely with vercel preview branching
using neon and drizzle seems to try overwriting the meta info upon migration?