import { Migration, MigrationRecord, Migrator, StmtMigration } from './index.js'; import { DatabaseAdapter } from '../electric/adapter.js'; import { QualifiedTablename } from '../util/index.js'; import { QueryBuilder } from './query-builder/index.js'; import { ForeignKeyChecks } from '../config/index.js'; export declare const SCHEMA_VSN_ERROR_MSG = "Local schema doesn't match server's. Clear local state through developer tools and retry connection manually. If error persists, re-generate the client. Check documentation (https://electric-sql.com/docs/reference/roadmap) to learn more."; export declare abstract class BundleMigratorBase implements Migrator { queryBuilder: QueryBuilder; private namespace; adapter: DatabaseAdapter; migrations: StmtMigration[]; readonly tableName = "_electric_migrations"; readonly migrationsTable: QualifiedTablename; constructor(adapter: DatabaseAdapter, migrations: Migration[] | undefined, queryBuilder: QueryBuilder, namespace?: string); up(): Promise; migrationsTableExists(): Promise; queryApplied(): Promise; querySchemaVersion(): Promise; validateApplied(migrations: StmtMigration[], existing: MigrationRecord[]): Promise; apply({ statements, version }: StmtMigration, fkChecks?: ForeignKeyChecks): Promise; /** * Applies the provided migration only if it has not yet been applied. * @param migration The migration to apply. * @returns A promise that resolves to a boolean * that indicates if the migration was applied. */ applyIfNotAlready(migration: StmtMigration, fkChecks?: ForeignKeyChecks): Promise; } export declare class SqliteBundleMigrator extends BundleMigratorBase { constructor(adapter: DatabaseAdapter, migrations?: Migration[]); } export declare class PgBundleMigrator extends BundleMigratorBase { constructor(adapter: DatabaseAdapter, migrations?: Migration[]); }