From b2b39a53357d00b2f72ee2847ec25790d4620a99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kry=C5=A1tof=20Korb?= Date: Wed, 27 Nov 2024 13:56:47 +0100 Subject: [PATCH] Drop preview database instead of reset (#719) --- frontend/vercel-build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/vercel-build.sh b/frontend/vercel-build.sh index 0c45290c6..3d221fd78 100644 --- a/frontend/vercel-build.sh +++ b/frontend/vercel-build.sh @@ -11,5 +11,7 @@ else echo "Building for preview environment, using a clean database for \`$VERCEL_GIT_COMMIT_REF\` branch" GIT_COMMIT_REF_SHA=$(echo -n $VERCEL_GIT_COMMIT_REF | openssl dgst -sha256 | sed 's/^.* //') export DATABASE_URL="$DATABASE_URL_BASE/$GIT_COMMIT_REF_SHA" - prisma generate && prisma migrate reset --force && npm run build-only:preview && cp -r ../data ./dist/ + prisma generate + prisma db execute --file=<(echo "DROP SCHEMA public CASCADE; CREATE SCHEMA public;") --preview-feature + prisma migrate deploy && npm run build-only:preview && cp -r ../data ./dist/ fi