Adding in test check.

This commit is contained in:
mike12345567 2023-03-01 19:17:45 +00:00
parent eba18a4159
commit 923e9d8ec4
1 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,7 @@ import {
MigrationNoOpOptions,
App,
} from "@budibase/types"
import env from "../environment"
export const getMigrationsDoc = async (db: any) => {
// get the migrations doc
@ -88,7 +89,8 @@ export const runMigration = async (
const db = getDB(dbName, { skip_setup: true })
// DB doesn't exist - no-op required
if (!(await db.exists())) {
const dbExists = await db.exists()
if (!env.isTest() && !dbExists) {
continue
}
try {