mix arcana.gen.embedding_migration (Arcana v3.0.0)

Copy Markdown View Source

Generates a migration to update vector column dimensions.

Use this when switching to an embedding model with different dimensions.

$ mix arcana.gen.embedding_migration

The task will:

  1. Detect the current embedding configuration dimensions
  2. Show the detected dimensions
  3. Generate a migration to update the vector column

The down migration restores the dimensions the column had before this migration. Those are read from the database when it is reachable; otherwise pass --previous-dimensions. Without either, the generated down raises instead of silently truncating the column.

Options

  • --dimensions - Override auto-detected dimensions
  • --previous-dimensions - Dimensions the down migration restores, when they can't be read from the database