From 8de7c29cc491f4aca35574e352c65ae57f83a7f5 Mon Sep 17 00:00:00 2001 From: Daniel Adu-Gyan <26229521+danieladugyan@users.noreply.github.com> Date: Wed, 13 Mar 2024 15:48:44 +0100 Subject: [PATCH] Avoid running migrations in Vercel on PR branches --- vercel.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 vercel.sh diff --git a/vercel.sh b/vercel.sh new file mode 100644 index 000000000..15f95fb18 --- /dev/null +++ b/vercel.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +if [[ $VERCEL_ENV == "production" ]] ; then + pnpm run build && pnpm prisma migrate deploy +else + # prod and preview use the same database. + # We don't want to risk breaking it with a work-in-progress migration in a PR. + pnpm run build +fi \ No newline at end of file