From a8de9193d8257cc74e7b1593ee1d4cefa409bd93 Mon Sep 17 00:00:00 2001 From: chenos Date: Thu, 26 Sep 2024 22:23:40 +0800 Subject: [PATCH] feat: allow skipping db version check --- packages/core/database/src/database.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core/database/src/database.ts b/packages/core/database/src/database.ts index 6ef92765b6..a795b44cee 100644 --- a/packages/core/database/src/database.ts +++ b/packages/core/database/src/database.ts @@ -34,7 +34,6 @@ import { import { SequelizeStorage, Umzug } from 'umzug'; import { Collection, CollectionOptions, RepositoryType } from './collection'; import { CollectionFactory } from './collection-factory'; -import { CollectionGroupManager } from './collection-group-manager'; import { ImporterReader, ImportFileExtension } from './collection-importer'; import DatabaseUtils from './database-utils'; import ReferencesMap from './features/references-map'; @@ -847,7 +846,7 @@ export class Database extends EventEmitter implements AsyncEmitter { * @internal */ async checkVersion() { - return await checkDatabaseVersion(this); + return process.env.DB_SKIP_VERSION_CHECK === 'on' || (await checkDatabaseVersion(this)); } /**