@mikro-orm/migrations 6.3.1-dev.1 → 6.3.1-dev.10
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/MigrationStorage.js +1 -1
- package/Migrator.js +3 -3
- package/package.json +3 -3
package/MigrationStorage.js
CHANGED
|
@@ -24,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.MigrationStorage = void 0;
|
|
27
|
-
const path = __importStar(require("path"));
|
|
27
|
+
const path = __importStar(require("node:path"));
|
|
28
28
|
class MigrationStorage {
|
|
29
29
|
driver;
|
|
30
30
|
options;
|
package/Migrator.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Migrator = void 0;
|
|
4
4
|
const umzug_1 = require("umzug");
|
|
5
|
-
const
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
6
|
const fs_extra_1 = require("fs-extra");
|
|
7
7
|
const core_1 = require("@mikro-orm/core");
|
|
8
8
|
const knex_1 = require("@mikro-orm/knex");
|
|
@@ -35,7 +35,7 @@ class Migrator {
|
|
|
35
35
|
/* istanbul ignore next */
|
|
36
36
|
const snapshotPath = this.options.emit === 'ts' && this.options.pathTs ? this.options.pathTs : this.options.path;
|
|
37
37
|
const absoluteSnapshotPath = core_1.Utils.absolutePath(snapshotPath, this.config.get('baseDir'));
|
|
38
|
-
const dbName = (0,
|
|
38
|
+
const dbName = (0, node_path_1.basename)(this.config.get('dbName'));
|
|
39
39
|
const snapshotName = this.options.snapshotName ?? `.snapshot-${dbName}`;
|
|
40
40
|
this.snapshotPath = core_1.Utils.normalizePath(absoluteSnapshotPath, `${snapshotName}.json`);
|
|
41
41
|
this.createUmzug();
|
|
@@ -90,7 +90,7 @@ class Migrator {
|
|
|
90
90
|
this.runner = new MigrationRunner_1.MigrationRunner(this.driver, this.options, this.config);
|
|
91
91
|
this.storage = new MigrationStorage_1.MigrationStorage(this.driver, this.options);
|
|
92
92
|
let migrations = {
|
|
93
|
-
glob: (0,
|
|
93
|
+
glob: (0, node_path_1.join)(this.absolutePath, this.options.glob).replace(/\\/g, '/'),
|
|
94
94
|
resolve: (params) => this.resolve(params),
|
|
95
95
|
};
|
|
96
96
|
if (this.options.migrationsList) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/migrations",
|
|
3
|
-
"version": "6.3.1-dev.
|
|
3
|
+
"version": "6.3.1-dev.10",
|
|
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
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@mikro-orm/knex": "6.3.1-dev.
|
|
61
|
+
"@mikro-orm/knex": "6.3.1-dev.10",
|
|
62
62
|
"fs-extra": "11.2.0",
|
|
63
63
|
"umzug": "3.8.1"
|
|
64
64
|
},
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"@mikro-orm/core": "^6.3.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.3.1-dev.
|
|
69
|
+
"@mikro-orm/core": "6.3.1-dev.10"
|
|
70
70
|
}
|
|
71
71
|
}
|