You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@mikro-orm/migrations

Package Overview
Dependencies
Maintainers
1
Versions
4112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mikro-orm/migrations - npm Package Compare versions

Comparing version
7.0.0-dev.296
to
7.0.0-dev.298
+7
-6
Migrator.js

@@ -100,9 +100,10 @@ import { t, Type, UnknownType, } from '@mikro-orm/core';

const result = await super.runMigrations(method, options);
// Only update the snapshot after `down` — after reverting, the DB state
// diverges from what was stored during `create`, so we need to refresh it.
// For `up`, the snapshot is already up to date (written during `create`),
// and writing it would break read-only production environments (GH #7232).
if (method === 'down' && result.length > 0 && this.options.snapshot) {
if (result.length > 0 && this.options.snapshot) {
const schema = await DatabaseSchema.create(this.em.getConnection(), this.em.getPlatform(), this.config);
await this.storeCurrentSchema(schema);
try {
await this.storeCurrentSchema(schema);
}
catch {
// Silently ignore for read-only filesystems (production).
}
}

@@ -109,0 +110,0 @@ return result;

{
"name": "@mikro-orm/migrations",
"type": "module",
"version": "7.0.0-dev.296",
"version": "7.0.0-dev.298",
"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.",

@@ -53,3 +53,3 @@ "exports": {

"dependencies": {
"@mikro-orm/sql": "7.0.0-dev.296"
"@mikro-orm/sql": "7.0.0-dev.298"
},

@@ -60,4 +60,4 @@ "devDependencies": {

"peerDependencies": {
"@mikro-orm/core": "7.0.0-dev.296"
"@mikro-orm/core": "7.0.0-dev.298"
}
}

Sorry, the diff of this file is not supported yet