Skip to main content

Class: MigrationEngine

Defined in: packages/agentos/src/cognition/rag/migration/MigrationEngine.ts:33

Constructors​

Constructor​

new MigrationEngine(): MigrationEngine

Returns​

MigrationEngine

Methods​

migrate()​

static migrate(options): Promise<MigrationResult>

Defined in: packages/agentos/src/cognition/rag/migration/MigrationEngine.ts:47

Migrate data between any two backends.

The engine:

  1. Connects to source and lists available tables.
  2. For each table, reads rows in streaming batches.
  3. Creates the table in the target (if it doesn't exist).
  4. Writes each batch to the target.
  5. Reports progress after each batch.

Parameters​

options​

MigrationOptions

Source, target, batch size, and progress callback.

Returns​

Promise<MigrationResult>

Migration result with counts, duration, and any errors.