@mikro-orm/migrations 7.0.7-dev.11 → 7.0.7-dev.13

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.
Files changed (2) hide show
  1. package/Migrator.js +3 -2
  2. package/package.json +3 -3
package/Migrator.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t, Type, UnknownType, } from '@mikro-orm/core';
1
+ import { Utils, t, Type, UnknownType, } from '@mikro-orm/core';
2
2
  import { AbstractMigrator } from '@mikro-orm/core/migrations';
3
3
  import { DatabaseSchema, DatabaseTable, } from '@mikro-orm/sql';
4
4
  import { MigrationRunner } from './MigrationRunner.js';
@@ -99,7 +99,8 @@ export class Migrator extends AbstractMigrator {
99
99
  async runMigrations(method, options) {
100
100
  const result = await super.runMigrations(method, options);
101
101
  if (result.length > 0 && this.options.snapshot) {
102
- const schema = await DatabaseSchema.create(this.em.getConnection(), this.em.getPlatform(), this.config);
102
+ const ctx = Utils.isObject(options) ? options.transaction : undefined;
103
+ const schema = await DatabaseSchema.create(this.em.getConnection(), this.em.getPlatform(), this.config, undefined, undefined, undefined, undefined, undefined, ctx);
103
104
  try {
104
105
  await this.storeCurrentSchema(schema);
105
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/migrations",
3
- "version": "7.0.7-dev.11",
3
+ "version": "7.0.7-dev.13",
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",
@@ -47,13 +47,13 @@
47
47
  "copy": "node ../../scripts/copy.mjs"
48
48
  },
49
49
  "dependencies": {
50
- "@mikro-orm/sql": "7.0.7-dev.11"
50
+ "@mikro-orm/sql": "7.0.7-dev.13"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@mikro-orm/core": "^7.0.6"
54
54
  },
55
55
  "peerDependencies": {
56
- "@mikro-orm/core": "7.0.7-dev.11"
56
+ "@mikro-orm/core": "7.0.7-dev.13"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">= 22.17.0"