Skip to content

Scheduling infrastructure for absolutely everyone.

chore: Add check to skip DB migrations as part of build (#17827)

Keith Williams21956f096d89
diff --git a/packages/prisma/auto-migrations.ts b/packages/prisma/auto-migrations.ts
index 3ae7c24a5f2..2286f5d8013 100644
--- a/packages/prisma/auto-migrations.ts
+++ b/packages/prisma/auto-migrations.ts
@@ -14,6 +14,10 @@ const exec = promisify(execCb);
* @see https://github.com/prisma/prisma/issues/4703#issuecomment-1447354363
*/
async function main(): Promise<void> {
+ if (process.env.SKIP_DB_MIGRATIONS === "1") {
+ console.info("SKIP_DB_MIGRATIONS set, skipping migrations");
+ return;
+ }
if (!process.env.DATABASE_URL) {
console.info("No DATABASE_URL found, skipping migrations");
return;
diff --git a/turbo.json b/turbo.json
index 4ed07ff9936..743703ad381 100644
--- a/turbo.json
+++ b/turbo.json
@@ -403,6 +403,7 @@
"SENTRY_DISABLE_CLIENT_SOURCE_MAPS",
"SENTRY_DISABLE_SERVER_SOURCE_MAPS",
"SENTRY_DISABLE_SERVER_WEBPACK_PLUGIN",
+ "SKIP_DB_MIGRATIONS",
"SLACK_CLIENT_ID",
"SLACK_CLIENT_SECRET",
"SLACK_SIGNING_SECRET",