@mikro-orm/core 7.2.0-dev.1 → 7.2.0-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "7.2.0-dev.1",
3
+ "version": "7.2.0-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
  "keywords": [
6
6
  "data-mapper",
@@ -233,6 +233,12 @@ export type MigrationsOptions = {
233
233
  * @default true
234
234
  */
235
235
  snapshot?: boolean;
236
+ /**
237
+ * Update the snapshot from the database schema when running migrations up or down.
238
+ * Disable to keep the snapshot managed solely by `migration:create`.
239
+ * @default true
240
+ */
241
+ snapshotOnMigrate?: boolean;
236
242
  /** Custom name for the snapshot file. */
237
243
  snapshotName?: string;
238
244
  /**
@@ -84,6 +84,7 @@ const DEFAULTS = {
84
84
  dropTables: true,
85
85
  safe: false,
86
86
  snapshot: true,
87
+ snapshotOnMigrate: true,
87
88
  emit: 'ts',
88
89
  fileName: (timestamp, name) => `Migration${timestamp}${name ? '_' + name : ''}`,
89
90
  },
package/utils/Utils.js CHANGED
@@ -153,7 +153,7 @@ export function parseJsonSafe(value) {
153
153
  /** Collection of general-purpose utility methods used throughout the ORM. */
154
154
  export class Utils {
155
155
  static PK_SEPARATOR = '~~~';
156
- static #ORM_VERSION = '7.2.0-dev.1';
156
+ static #ORM_VERSION = '7.2.0-dev.2';
157
157
  /**
158
158
  * Checks if the argument is instance of `Object`. Returns false for arrays.
159
159
  */
package/utils/env-vars.js CHANGED
@@ -79,6 +79,7 @@ export function loadEnvironmentVars() {
79
79
  read2('silent', bool);
80
80
  read2('emit');
81
81
  read2('snapshot', bool);
82
+ read2('snapshotOnMigrate', bool);
82
83
  read2('snapshotName');
83
84
  cleanup(ret, 'migrations');
84
85
  ret.schemaGenerator = {};