Skip to content

Commit

Permalink
Avoid running migrations in Vercel on PR branches
Browse files Browse the repository at this point in the history
  • Loading branch information
danieladugyan committed Mar 13, 2024
1 parent 7f8c76b commit 8de7c29
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions vercel.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8de7c29

Please sign in to comment.