Allow skipping migrations
This commit is contained in:
parent
863587ef30
commit
90db9efb70
|
@ -183,6 +183,7 @@ const environment = {
|
||||||
environment[key] = value
|
environment[key] = value
|
||||||
},
|
},
|
||||||
ROLLING_LOG_MAX_SIZE: process.env.ROLLING_LOG_MAX_SIZE || "10M",
|
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
|
// clean up any environment variable edge cases
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
import { UserCtx } from "@budibase/types"
|
import { UserCtx } from "@budibase/types"
|
||||||
import { checkMissingMigrations } from "../appMigrations"
|
import { checkMissingMigrations } from "../appMigrations"
|
||||||
|
import { env } from "@budibase/backend-core"
|
||||||
|
|
||||||
export default async (ctx: UserCtx, next: any) => {
|
export default async (ctx: UserCtx, next: any) => {
|
||||||
const { appId } = ctx
|
const { appId } = ctx
|
||||||
|
|
||||||
|
if (env.SKIP_APP_MIGRATIONS) {
|
||||||
|
return next()
|
||||||
|
}
|
||||||
|
|
||||||
if (!appId) {
|
if (!appId) {
|
||||||
return next()
|
return next()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue