@mikro-orm/migrations-mongodb 7.0.2-dev.12 → 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 +1 -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,7 @@
|
|
|
1
1
|
import type { Configuration, Transaction, EntityName } from '@mikro-orm/core';
|
|
2
2
|
import type { MongoDriver } from '@mikro-orm/mongodb';
|
|
3
3
|
import type { Collection, ClientSession, Document, Db } from 'mongodb';
|
|
4
|
+
/** Base class for MongoDB migrations. Extend this class and implement `up()` (and optionally `down()`). */
|
|
4
5
|
export declare abstract class Migration {
|
|
5
6
|
protected readonly driver: MongoDriver;
|
|
6
7
|
protected readonly config: Configuration;
|
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 { MongoDriver } from '@mikro-orm/mongodb';
|
|
3
|
+
/** Base class for generating MongoDB migration source files. */
|
|
3
4
|
export declare abstract class MigrationGenerator implements IMigrationGenerator {
|
|
4
5
|
protected readonly driver: MongoDriver;
|
|
5
6
|
protected readonly namingStrategy: NamingStrategy;
|
package/MigrationGenerator.js
CHANGED
package/MigrationRunner.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { MigrationsOptions, Transaction } from '@mikro-orm/core';
|
|
2
2
|
import type { MongoDriver } from '@mikro-orm/mongodb';
|
|
3
3
|
import type { Migration } from './Migration.js';
|
|
4
|
+
/** Executes individual MongoDB migration files within optional transaction contexts. */
|
|
4
5
|
export declare class MigrationRunner {
|
|
5
6
|
protected readonly driver: MongoDriver;
|
|
6
7
|
protected readonly options: MigrationsOptions;
|
package/MigrationRunner.js
CHANGED
package/MigrationStorage.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type EntitySchema, type MigrationsOptions, type Transaction } from '@mikro-orm/core';
|
|
2
2
|
import type { MongoDriver } from '@mikro-orm/mongodb';
|
|
3
3
|
import type { MigrationRow } from './typings.js';
|
|
4
|
+
/** Tracks executed MongoDB migrations in a collection. */
|
|
4
5
|
export declare class MigrationStorage {
|
|
5
6
|
protected readonly driver: MongoDriver;
|
|
6
7
|
protected readonly options: MigrationsOptions;
|
package/MigrationStorage.js
CHANGED
package/Migrator.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { AbstractMigrator } from '@mikro-orm/core/migrations';
|
|
|
3
3
|
import type { MongoDriver } from '@mikro-orm/mongodb';
|
|
4
4
|
import { MigrationStorage } from './MigrationStorage.js';
|
|
5
5
|
import type { MigrationResult } from './typings.js';
|
|
6
|
+
/** Manages MongoDB migrations: creation, execution, and rollback. */
|
|
6
7
|
export declare class Migrator extends AbstractMigrator<MongoDriver> {
|
|
7
8
|
static register(orm: MikroORM): void;
|
|
8
9
|
protected createRunner(): IMigrationRunner;
|
package/Migrator.js
CHANGED
|
@@ -3,6 +3,7 @@ import { MigrationRunner } from './MigrationRunner.js';
|
|
|
3
3
|
import { MigrationStorage } from './MigrationStorage.js';
|
|
4
4
|
import { TSMigrationGenerator } from './TSMigrationGenerator.js';
|
|
5
5
|
import { JSMigrationGenerator } from './JSMigrationGenerator.js';
|
|
6
|
+
/** Manages MongoDB migrations: creation, execution, and rollback. */
|
|
6
7
|
export class Migrator extends AbstractMigrator {
|
|
7
8
|
static register(orm) {
|
|
8
9
|
orm.config.registerExtension('@mikro-orm/migrator', () => new Migrator(orm.em));
|
package/TSMigrationGenerator.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/migrations-mongodb",
|
|
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,14 +47,14 @@
|
|
|
47
47
|
"copy": "node ../../scripts/copy.mjs"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@mikro-orm/mongodb": "7.0.2-dev.
|
|
50
|
+
"@mikro-orm/mongodb": "7.0.2-dev.14",
|
|
51
51
|
"mongodb": "7.1.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@mikro-orm/core": "^7.0.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@mikro-orm/core": "7.0.2-dev.
|
|
57
|
+
"@mikro-orm/core": "7.0.2-dev.14"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">= 22.17.0"
|