import { type AnyEntity, type Configuration, type EntityData, type RawQueryFragment, type Transaction, } from '@mikro-orm/core'; import type { AbstractSqlDriver, EntityManager, NativeQueryBuilder } from '@mikro-orm/sql'; /** A migration query: raw SQL string, a native query builder instance, or a `raw()` SQL fragment. */ export type Query = string | NativeQueryBuilder | RawQueryFragment; /** Base class for SQL database migrations. Extend this class and implement `up()` (and optionally `down()`). */ export declare abstract class Migration { #private; protected readonly driver: AbstractSqlDriver; protected readonly config: Configuration; protected ctx?: Transaction; constructor(driver: AbstractSqlDriver, config: Configuration); abstract up(): Promise | void; down(): Promise | void; isTransactional(): boolean; addSql(sql: Query): void; reset(): void; setTransactionContext(ctx: Transaction): void; /** * Executes a raw SQL query. Accepts a string SQL, `raw()` SQL fragment, or a native query builder instance. * The `params` parameter is respected only if you use string SQL in the first parameter. */ execute(sql: Query, params?: unknown[]): Promise[]>; /** * Creates a cached `EntityManager` instance for this migration, which will respect * the current transaction context. */ getEntityManager(): EntityManager; getQueries(): Query[]; }