Class: VectorMigrator
Defined in: src/batteries/vector/migrate.ts:48
Knex-style migration runner: applies pending migrations forward and rolls the last one back.
Constructors
Constructor
new VectorMigrator(opts: VectorMigrateOptions): VectorMigrator;Defined in: src/batteries/vector/migrate.ts:56
Parameters
| Parameter | Type | Description |
|---|---|---|
opts | VectorMigrateOptions | The migrations, ledger, and schema facade to run against. |
Returns
VectorMigrator
Methods
latest()
latest(): Promise<string[]>;Defined in: src/batteries/vector/migrate.ts:68
Apply every not-yet-applied migration in order, recording each in the ledger.
Returns
Promise<string[]>
The names of the migrations applied during this run.
Throws
@nhtio/adk/batteries!E_VECTOR_STORE_MIGRATION_FAILED when a migration's up throws.
rollback()
rollback(): Promise<string | null>;Defined in: src/batteries/vector/migrate.ts:95
Reverse the most recently applied migration and remove it from the ledger.
Returns
Promise<string | null>
The name of the rolled-back migration, or null when nothing was applied.
Throws
@nhtio/adk/batteries!E_VECTOR_STORE_MIGRATION_FAILED when the migration module is missing or its down throws.