@mikro-orm/core 7.3.0-dev.15 → 7.3.0-dev.16
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 +1 -1
- package/utils/Configuration.d.ts +11 -0
- package/utils/Utils.js +1 -1
- package/utils/env-vars.js +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "7.3.0-dev.
|
|
3
|
+
"version": "7.3.0-dev.16",
|
|
4
4
|
"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.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data-mapper",
|
package/utils/Configuration.d.ts
CHANGED
|
@@ -218,6 +218,17 @@ export type MigrationsOptions = {
|
|
|
218
218
|
* @default true
|
|
219
219
|
*/
|
|
220
220
|
allOrNothing?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Serialize concurrent `migrator.up()`/`migrator.down()` runs (e.g. several replicas migrating on start) with a
|
|
223
|
+
* database lock, held on a pooled connection of its own for the whole run (so `pool.max` needs to be at least 2).
|
|
224
|
+
* Supported on PostgreSQL, MySQL, MariaDB and MSSQL, ignored elsewhere.
|
|
225
|
+
* @default false
|
|
226
|
+
*/
|
|
227
|
+
lock?: boolean;
|
|
228
|
+
/**
|
|
229
|
+
* How long to wait for the migration lock (in milliseconds) before failing. Waits indefinitely by default.
|
|
230
|
+
*/
|
|
231
|
+
lockTimeout?: number;
|
|
221
232
|
/**
|
|
222
233
|
* Allow dropping tables during schema diff.
|
|
223
234
|
* @default true
|
package/utils/Utils.js
CHANGED
|
@@ -153,7 +153,7 @@ export function parseJsonSafe(value) {
|
|
|
153
153
|
/** Collection of general-purpose utility methods used throughout the ORM. */
|
|
154
154
|
export class Utils {
|
|
155
155
|
static PK_SEPARATOR = '~~~';
|
|
156
|
-
static #ORM_VERSION = '7.3.0-dev.
|
|
156
|
+
static #ORM_VERSION = '7.3.0-dev.16';
|
|
157
157
|
/** Default session variable name backing an RLS filter argument (`current_setting('mikro.<filter>.<arg>')`). */
|
|
158
158
|
static getRlsSettingName(filterName, argName) {
|
|
159
159
|
return `mikro.${filterName}.${argName}`;
|
package/utils/env-vars.js
CHANGED
|
@@ -74,6 +74,8 @@ export function loadEnvironmentVars() {
|
|
|
74
74
|
read2('transactional', bool);
|
|
75
75
|
read2('disableForeignKeys', bool);
|
|
76
76
|
read2('allOrNothing', bool);
|
|
77
|
+
read2('lock', bool);
|
|
78
|
+
read2('lockTimeout', num);
|
|
77
79
|
read2('dropTables', bool);
|
|
78
80
|
read2('safe', bool);
|
|
79
81
|
read2('silent', bool);
|