@mikro-orm/core 7.0.0-dev.222 → 7.0.0-dev.224

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
3
  "type": "module",
4
- "version": "7.0.0-dev.222",
4
+ "version": "7.0.0-dev.224",
5
5
  "description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
6
6
  "exports": {
7
7
  "./package.json": "./package.json",
@@ -83,7 +83,6 @@ declare const DEFAULTS: {
83
83
  readonly glob: "!(*.d).{js,ts,cjs}";
84
84
  readonly silent: false;
85
85
  readonly transactional: true;
86
- readonly disableForeignKeys: false;
87
86
  readonly allOrNothing: true;
88
87
  readonly dropTables: true;
89
88
  readonly safe: false;
@@ -92,7 +91,6 @@ declare const DEFAULTS: {
92
91
  readonly fileName: (timestamp: string, name?: string) => string;
93
92
  };
94
93
  readonly schemaGenerator: {
95
- readonly disableForeignKeys: false;
96
94
  readonly createForeignKeyConstraints: true;
97
95
  readonly ignoreSchema: readonly [];
98
96
  readonly skipTables: readonly [];
@@ -848,6 +846,10 @@ export interface Options<Driver extends IDatabaseDriver = IDatabaseDriver, EM ex
848
846
  * @default false
849
847
  */
850
848
  disableForeignKeys?: boolean;
849
+ /**
850
+ * Try to disable foreign key checks during `schema.clear()`. Enabled by default for MySQL/MariaDB.
851
+ */
852
+ disableForeignKeysForClear?: boolean;
851
853
  /**
852
854
  * Generate foreign key constraints.
853
855
  * @default true
@@ -76,7 +76,6 @@ const DEFAULTS = {
76
76
  glob: '!(*.d).{js,ts,cjs}',
77
77
  silent: false,
78
78
  transactional: true,
79
- disableForeignKeys: false,
80
79
  allOrNothing: true,
81
80
  dropTables: true,
82
81
  safe: false,
@@ -85,7 +84,6 @@ const DEFAULTS = {
85
84
  fileName: (timestamp, name) => `Migration${timestamp}${name ? '_' + name : ''}`,
86
85
  },
87
86
  schemaGenerator: {
88
- disableForeignKeys: false,
89
87
  createForeignKeyConstraints: true,
90
88
  ignoreSchema: [],
91
89
  skipTables: [],
package/utils/Utils.js CHANGED
@@ -123,7 +123,7 @@ export function parseJsonSafe(value) {
123
123
  }
124
124
  export class Utils {
125
125
  static PK_SEPARATOR = '~~~';
126
- static #ORM_VERSION = '7.0.0-dev.222';
126
+ static #ORM_VERSION = '7.0.0-dev.224';
127
127
  /**
128
128
  * Checks if the argument is instance of `Object`. Returns false for arrays.
129
129
  */