Allow skipping migrations
This commit is contained in:
parent
863587ef30
commit
90db9efb70
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue