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

This commit is contained in:
Keith Williams
2024-11-25 16:33:51 -03:00
committed by GitHub
parent d1adfa3bf9
commit 21956f096d
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -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;
+1
View File
@@ -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",