@mikro-orm/migrations 6.6.9-dev.1 → 6.6.9-dev.2
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/Migrator.js +7 -6
- package/package.json +3 -3
package/Migrator.js
CHANGED
|
@@ -353,13 +353,14 @@ class Migrator {
|
|
|
353
353
|
else {
|
|
354
354
|
result = await this.driver.getConnection().transactional(trx => this.runInTransaction(trx, method, options));
|
|
355
355
|
}
|
|
356
|
-
|
|
357
|
-
// diverges from what was stored during `create`, so we need to refresh it.
|
|
358
|
-
// For `up`, the snapshot is already up to date (written during `create`),
|
|
359
|
-
// and writing it would break read-only production environments (GH #7232).
|
|
360
|
-
if (method === 'down' && result.length > 0 && this.options.snapshot) {
|
|
356
|
+
if (result.length > 0 && this.options.snapshot) {
|
|
361
357
|
const schema = await knex_1.DatabaseSchema.create(this.em.getConnection(), this.em.getPlatform(), this.config);
|
|
362
|
-
|
|
358
|
+
try {
|
|
359
|
+
await this.storeCurrentSchema(schema);
|
|
360
|
+
}
|
|
361
|
+
catch {
|
|
362
|
+
// Silently ignore for read-only filesystems (production).
|
|
363
|
+
}
|
|
363
364
|
}
|
|
364
365
|
return result;
|
|
365
366
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/migrations",
|
|
3
|
-
"version": "6.6.9-dev.
|
|
3
|
+
"version": "6.6.9-dev.2",
|
|
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.6.9-dev.
|
|
61
|
+
"@mikro-orm/knex": "6.6.9-dev.2",
|
|
62
62
|
"fs-extra": "11.3.3",
|
|
63
63
|
"umzug": "3.8.2"
|
|
64
64
|
},
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"@mikro-orm/core": "^6.6.8"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.6.9-dev.
|
|
69
|
+
"@mikro-orm/core": "6.6.9-dev.2"
|
|
70
70
|
}
|
|
71
71
|
}
|