@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.
- package/JSMigrationGenerator.d.ts +1 -0
- package/JSMigrationGenerator.js +1 -0
- package/Migration.d.ts +2 -0
- package/Migration.js +1 -0
- package/MigrationGenerator.d.ts +1 -0
- package/MigrationGenerator.js +1 -0
- package/MigrationRunner.d.ts +1 -0
- package/MigrationRunner.js +1 -0
- package/MigrationStorage.d.ts +1 -0
- package/MigrationStorage.js +1 -0
- package/Migrator.d.ts +1 -0
- package/Migrator.js +1 -0
- package/TSMigrationGenerator.d.ts +1 -0
- package/TSMigrationGenerator.js +1 -0
- package/package.json +3 -3
package/JSMigrationGenerator.js
CHANGED
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
package/MigrationGenerator.d.ts
CHANGED
|
@@ -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;
|
package/MigrationGenerator.js
CHANGED
package/MigrationRunner.d.ts
CHANGED
|
@@ -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;
|
package/MigrationRunner.js
CHANGED
package/MigrationStorage.d.ts
CHANGED
|
@@ -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;
|
package/MigrationStorage.js
CHANGED
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;
|
package/TSMigrationGenerator.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/migrations",
|
|
3
|
-
"version": "7.0.2-dev.
|
|
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.
|
|
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.
|
|
56
|
+
"@mikro-orm/core": "7.0.2-dev.14"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">= 22.17.0"
|