@mikro-orm/migrations 7.0.2-dev.13 → 7.0.2-dev.14

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.
@@ -1,4 +1,5 @@
1
1
  import { MigrationGenerator } from './MigrationGenerator.js';
2
+ /** Generates migration files in CommonJS JavaScript format. */
2
3
  export declare class JSMigrationGenerator extends MigrationGenerator {
3
4
  /**
4
5
  * @inheritDoc
@@ -1,4 +1,5 @@
1
1
  import { MigrationGenerator } from './MigrationGenerator.js';
2
+ /** Generates migration files in CommonJS JavaScript format. */
2
3
  export class JSMigrationGenerator extends MigrationGenerator {
3
4
  /**
4
5
  * @inheritDoc
package/Migration.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { type AnyEntity, type Configuration, type EntityData, type RawQueryFragment, type Transaction } from '@mikro-orm/core';
2
2
  import type { AbstractSqlDriver, EntityManager, NativeQueryBuilder } from '@mikro-orm/sql';
3
+ /** A migration query: raw SQL string, a native query builder instance, or a `raw()` SQL fragment. */
3
4
  export type Query = string | NativeQueryBuilder | RawQueryFragment;
5
+ /** Base class for SQL database migrations. Extend this class and implement `up()` (and optionally `down()`). */
4
6
  export declare abstract class Migration {
5
7
  #private;
6
8
  protected readonly driver: AbstractSqlDriver;
package/Migration.js CHANGED
@@ -1,3 +1,4 @@
1
+ /** Base class for SQL database migrations. Extend this class and implement `up()` (and optionally `down()`). */
1
2
  export class Migration {
2
3
  driver;
3
4
  config;
@@ -1,5 +1,6 @@
1
1
  import { type IMigrationGenerator, type MaybePromise, type MigrationsOptions, type NamingStrategy } from '@mikro-orm/core';
2
2
  import type { AbstractSqlDriver } from '@mikro-orm/sql';
3
+ /** Base class for generating migration source files from schema diffs. */
3
4
  export declare abstract class MigrationGenerator implements IMigrationGenerator {
4
5
  protected readonly driver: AbstractSqlDriver;
5
6
  protected readonly namingStrategy: NamingStrategy;
@@ -1,3 +1,4 @@
1
+ /** Base class for generating migration source files from schema diffs. */
1
2
  export class MigrationGenerator {
2
3
  driver;
3
4
  namingStrategy;
@@ -1,6 +1,7 @@
1
1
  import { type Configuration, type MigrationsOptions, type Transaction } from '@mikro-orm/core';
2
2
  import type { AbstractSqlDriver } from '@mikro-orm/sql';
3
3
  import type { Migration } from './Migration.js';
4
+ /** Executes individual migration files within optional transaction contexts. */
4
5
  export declare class MigrationRunner {
5
6
  #private;
6
7
  protected readonly driver: AbstractSqlDriver;
@@ -1,4 +1,5 @@
1
1
  import { Utils } from '@mikro-orm/core';
2
+ /** Executes individual migration files within optional transaction contexts. */
2
3
  export class MigrationRunner {
3
4
  driver;
4
5
  options;
@@ -1,6 +1,7 @@
1
1
  import { type MigrationsOptions, type Transaction, type EntitySchema } from '@mikro-orm/core';
2
2
  import { type AbstractSqlDriver } from '@mikro-orm/sql';
3
3
  import type { MigrationRow } from './typings.js';
4
+ /** Tracks executed migrations in a database table. */
4
5
  export declare class MigrationStorage {
5
6
  #private;
6
7
  protected readonly driver: AbstractSqlDriver;
@@ -1,5 +1,6 @@
1
1
  import { defineEntity, p } from '@mikro-orm/core';
2
2
  import { DatabaseTable, } from '@mikro-orm/sql';
3
+ /** Tracks executed migrations in a database table. */
3
4
  export class MigrationStorage {
4
5
  driver;
5
6
  options;
package/Migrator.d.ts CHANGED
@@ -3,6 +3,7 @@ import { AbstractMigrator } from '@mikro-orm/core/migrations';
3
3
  import { type AbstractSqlDriver, DatabaseSchema, type EntityManager } from '@mikro-orm/sql';
4
4
  import { MigrationStorage } from './MigrationStorage.js';
5
5
  import type { MigrationResult } from './typings.js';
6
+ /** Manages SQL database migrations: creation, execution, and rollback of schema changes. */
6
7
  export declare class Migrator extends AbstractMigrator<AbstractSqlDriver> {
7
8
  #private;
8
9
  constructor(em: EntityManager);
package/Migrator.js CHANGED
@@ -5,6 +5,7 @@ import { MigrationRunner } from './MigrationRunner.js';
5
5
  import { MigrationStorage } from './MigrationStorage.js';
6
6
  import { TSMigrationGenerator } from './TSMigrationGenerator.js';
7
7
  import { JSMigrationGenerator } from './JSMigrationGenerator.js';
8
+ /** Manages SQL database migrations: creation, execution, and rollback of schema changes. */
8
9
  export class Migrator extends AbstractMigrator {
9
10
  #schemaGenerator;
10
11
  #snapshotPath;
@@ -1,4 +1,5 @@
1
1
  import { MigrationGenerator } from './MigrationGenerator.js';
2
+ /** Generates migration files in TypeScript format. */
2
3
  export declare class TSMigrationGenerator extends MigrationGenerator {
3
4
  /**
4
5
  * @inheritDoc
@@ -1,4 +1,5 @@
1
1
  import { MigrationGenerator } from './MigrationGenerator.js';
2
+ /** Generates migration files in TypeScript format. */
2
3
  export class TSMigrationGenerator extends MigrationGenerator {
3
4
  /**
4
5
  * @inheritDoc
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/migrations",
3
- "version": "7.0.2-dev.13",
3
+ "version": "7.0.2-dev.14",
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.2-dev.13"
50
+ "@mikro-orm/sql": "7.0.2-dev.14"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@mikro-orm/core": "^7.0.1"
54
54
  },
55
55
  "peerDependencies": {
56
- "@mikro-orm/core": "7.0.2-dev.13"
56
+ "@mikro-orm/core": "7.0.2-dev.14"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">= 22.17.0"