Interface MigrationOptions

Options for a migration operation.

interface MigrationOptions {
    from: BackendConfig;
    to: BackendConfig;
    batchSize?: number;
    onProgress?: ((done, total, table) => void);
    dryRun?: boolean;
}

Properties

Source backend configuration.

Target backend configuration.

batchSize?: number

Rows per batch for streaming reads/writes.

Default

1000
onProgress?: ((done, total, table) => void)

Progress callback fired after each batch write.

Type declaration

    • (done, total, table): void
    • Parameters

      • done: number

        Number of rows written so far for the current table.

      • total: number

        Total row count for the current table.

      • table: string

        Name of the table currently being migrated.

      Returns void

dryRun?: boolean

If true, counts rows but does not write to target.

Default

false