diff --git a/packages/core/database/src/database.ts b/packages/core/database/src/database.ts index 2dcf742575..3b5117b50c 100644 --- a/packages/core/database/src/database.ts +++ b/packages/core/database/src/database.ts @@ -41,6 +41,7 @@ import { referentialIntegrityCheck } from './features/referential-integrity-chec import { ArrayFieldRepository } from './field-repository/array-field-repository'; import * as FieldTypes from './fields'; import { Field, FieldContext, RelationField } from './fields'; +import { checkDatabaseVersion } from './helpers'; import { InheritedCollection } from './inherited-collection'; import InheritanceMap from './inherited-map'; import { InterfaceManager } from './interface-manager'; @@ -848,8 +849,7 @@ export class Database extends EventEmitter implements AsyncEmitter { * @internal */ async checkVersion() { - return true; - // return await checkDatabaseVersion(this); + return process.env.DB_SKIP_VERSION_CHECK === 'on' || (await checkDatabaseVersion(this)); } /**