Adding in test check.
This commit is contained in:
parent
eba18a4159
commit
923e9d8ec4
|
@ -17,6 +17,7 @@ import {
|
||||||
MigrationNoOpOptions,
|
MigrationNoOpOptions,
|
||||||
App,
|
App,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
import env from "../environment"
|
||||||
|
|
||||||
export const getMigrationsDoc = async (db: any) => {
|
export const getMigrationsDoc = async (db: any) => {
|
||||||
// get the migrations doc
|
// get the migrations doc
|
||||||
|
@ -88,7 +89,8 @@ export const runMigration = async (
|
||||||
|
|
||||||
const db = getDB(dbName, { skip_setup: true })
|
const db = getDB(dbName, { skip_setup: true })
|
||||||
// DB doesn't exist - no-op required
|
// DB doesn't exist - no-op required
|
||||||
if (!(await db.exists())) {
|
const dbExists = await db.exists()
|
||||||
|
if (!env.isTest() && !dbExists) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue