Allow skipping migrations

This commit is contained in:
Adria Navarro 2023-12-29 12:43:39 +01:00
parent 863587ef30
commit 90db9efb70
2 changed files with 6 additions and 0 deletions

View File

@ -183,6 +183,7 @@ const environment = {
environment[key] = value
},
ROLLING_LOG_MAX_SIZE: process.env.ROLLING_LOG_MAX_SIZE || "10M",
SKIP_APP_MIGRATIONS: process.env.SKIP_APP_MIGRATIONS || false,
}
// clean up any environment variable edge cases

View File

@ -1,9 +1,14 @@
import { UserCtx } from "@budibase/types"
import { checkMissingMigrations } from "../appMigrations"
import { env } from "@budibase/backend-core"
export default async (ctx: UserCtx, next: any) => {
const { appId } = ctx
if (env.SKIP_APP_MIGRATIONS) {
return next()
}
if (!appId) {
return next()
}