import { OnModuleInit } from "@nestjs/common"; import { AppLoggingService } from "../../logging/services/logging.service"; import { Neo4jService } from "../../neo4j/services/neo4j.service"; import { S3Service } from "../../../foundations/s3/services/s3.service"; /** * Migrator Service * * Manages Neo4j database migrations * * Features: * - Automatic migration discovery * - Transaction-based migration execution * - Migration versioning with date and increment * - Development and production support * - Unique constraint enforcement * * @example * Migration file: neo4j.migrations/20231201_01.ts * ```typescript * export const migration: MigrationInterface[] = [ * { * query: 'CREATE CONSTRAINT user_email IF NOT EXISTS FOR (u:User) REQUIRE u.email IS UNIQUE', * queryParams: {}, * }, * ]; * ``` */ export declare class MigratorService implements OnModuleInit { protected readonly neo4jService: Neo4jService; protected readonly s3Service: S3Service; private readonly logger; constructor(neo4jService: Neo4jService, s3Service: S3Service, logger: AppLoggingService); onModuleInit(): Promise; private createMigrationConstraints; private runMigrations; private getLastAppliedMigration; private discoverMigrations; private filterMigrationsToRun; private compareVersions; /** * Loads a migration file. Under module: NodeNext the compiled dist keeps a * NATIVE `import()`, which cannot load .ts migrations that use tsconfig * path aliases (e.g. `src/...`) — those only resolve through the host app's * CommonJS require chain (ts-node + tsconfig-paths in dev). Prefer require; * fall back to native import() for genuine ESM migration files. */ private loadMigrationModule; private executeMigrations; /** * Normalise a migration's exported `migration` array to MigrationStep[]. * Legacy `MigrationInterface[]` (no `kind`) entries become `{ kind: "cypher" }`. */ private _normaliseSteps; } //# sourceMappingURL=migrator.service.d.ts.map