@mikro-orm/migrations-mongodb 7.0.0-dev.75 → 7.0.0-dev.77
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/JSMigrationGenerator.js +1 -1
- package/MigrationGenerator.d.ts +1 -3
- package/MigrationGenerator.js +2 -4
- package/Migrator.d.ts +1 -3
- package/Migrator.js +4 -7
- package/TSMigrationGenerator.js +1 -1
- package/package.json +3 -3
package/JSMigrationGenerator.js
CHANGED
|
@@ -12,7 +12,7 @@ export class JSMigrationGenerator extends MigrationGenerator {
|
|
|
12
12
|
/* v8 ignore next */
|
|
13
13
|
diff.up.forEach(sql => ret += this.createStatement(sql, 4));
|
|
14
14
|
ret += ` }\n\n`;
|
|
15
|
-
/* v8 ignore next
|
|
15
|
+
/* v8 ignore next */
|
|
16
16
|
if (diff.down.length > 0) {
|
|
17
17
|
ret += ` async down() {\n`;
|
|
18
18
|
diff.down.forEach(sql => ret += this.createStatement(sql, 4));
|
package/MigrationGenerator.d.ts
CHANGED
|
@@ -12,9 +12,7 @@ export declare abstract class MigrationGenerator implements IMigrationGenerator
|
|
|
12
12
|
up: string[];
|
|
13
13
|
down: string[];
|
|
14
14
|
}, path?: string, name?: string): Promise<[string, string]>;
|
|
15
|
-
/**
|
|
16
|
-
* @inheritDoc
|
|
17
|
-
*/
|
|
15
|
+
/** @inheritDoc */
|
|
18
16
|
createStatement(query: string, padLeft: number): string;
|
|
19
17
|
/**
|
|
20
18
|
* @inheritDoc
|
package/MigrationGenerator.js
CHANGED
|
@@ -24,10 +24,8 @@ export class MigrationGenerator {
|
|
|
24
24
|
await writeFile(path + '/' + fileName, ret, { flush: true });
|
|
25
25
|
return [ret, fileName];
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* @inheritDoc
|
|
30
|
-
*/
|
|
27
|
+
/** @inheritDoc */
|
|
28
|
+
/* v8 ignore next */
|
|
31
29
|
createStatement(query, padLeft) {
|
|
32
30
|
if (query) {
|
|
33
31
|
const padding = ' '.repeat(padLeft);
|
package/Migrator.d.ts
CHANGED
|
@@ -20,9 +20,7 @@ export declare class Migrator implements IMigrator {
|
|
|
20
20
|
* @inheritDoc
|
|
21
21
|
*/
|
|
22
22
|
create(path?: string, blank?: boolean, initial?: boolean, name?: string): Promise<MigrationResult>;
|
|
23
|
-
/**
|
|
24
|
-
* @inheritDoc
|
|
25
|
-
*/
|
|
23
|
+
/** @inheritDoc */
|
|
26
24
|
checkSchema(): Promise<boolean>;
|
|
27
25
|
/**
|
|
28
26
|
* @inheritDoc
|
package/Migrator.js
CHANGED
|
@@ -41,14 +41,11 @@ export class Migrator {
|
|
|
41
41
|
diff,
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
* @inheritDoc
|
|
47
|
-
*/
|
|
44
|
+
/** @inheritDoc */
|
|
45
|
+
/* v8 ignore next */
|
|
48
46
|
async checkSchema() {
|
|
49
47
|
return true;
|
|
50
48
|
}
|
|
51
|
-
/* v8 ignore stop */
|
|
52
49
|
/**
|
|
53
50
|
* @inheritDoc
|
|
54
51
|
*/
|
|
@@ -76,7 +73,7 @@ export class Migrator {
|
|
|
76
73
|
glob: join(this.absolutePath, this.options.glob).replace(/\\/g, '/'),
|
|
77
74
|
resolve: (params) => this.resolve(params),
|
|
78
75
|
};
|
|
79
|
-
/* v8 ignore next
|
|
76
|
+
/* v8 ignore next */
|
|
80
77
|
if (this.options.migrationsList) {
|
|
81
78
|
migrations = this.options.migrationsList.map(migration => {
|
|
82
79
|
if (typeof migration === 'function') {
|
|
@@ -97,7 +94,7 @@ export class Migrator {
|
|
|
97
94
|
this.umzug.on('reverting', event => logger.log('migrator', `Processing '${event.name}'`, { enabled: true }));
|
|
98
95
|
this.umzug.on('reverted', event => logger.log('migrator', `Reverted '${event.name}'`, { enabled: true }));
|
|
99
96
|
}
|
|
100
|
-
/* v8 ignore next
|
|
97
|
+
/* v8 ignore next */
|
|
101
98
|
if (this.options.generator) {
|
|
102
99
|
this.generator = new this.options.generator(this.driver, this.config.getNamingStrategy(), this.options);
|
|
103
100
|
}
|
package/TSMigrationGenerator.js
CHANGED
|
@@ -10,7 +10,7 @@ export class TSMigrationGenerator extends MigrationGenerator {
|
|
|
10
10
|
/* v8 ignore next */
|
|
11
11
|
diff.up.forEach(sql => ret += this.createStatement(sql, 4));
|
|
12
12
|
ret += ` }\n\n`;
|
|
13
|
-
/* v8 ignore next
|
|
13
|
+
/* v8 ignore next */
|
|
14
14
|
if (diff.down.length > 0) {
|
|
15
15
|
ret += ` async down(): Promise<void> {\n`;
|
|
16
16
|
diff.down.forEach(sql => ret += this.createStatement(sql, 4));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/migrations-mongodb",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.0-dev.
|
|
4
|
+
"version": "7.0.0-dev.77",
|
|
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",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@mikro-orm/mongodb": "7.0.0-dev.
|
|
53
|
+
"@mikro-orm/mongodb": "7.0.0-dev.77",
|
|
54
54
|
"mongodb": "6.20.0",
|
|
55
55
|
"umzug": "3.8.2"
|
|
56
56
|
},
|
|
@@ -58,6 +58,6 @@
|
|
|
58
58
|
"@mikro-orm/core": "^6.6.1"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@mikro-orm/core": "7.0.0-dev.
|
|
61
|
+
"@mikro-orm/core": "7.0.0-dev.77"
|
|
62
62
|
}
|
|
63
63
|
}
|