Recollect.MigrationGenerator (recollect v0.5.1)

Copy Markdown View Source

Generates database-specific migration content for Recollect tables.

This module provides adapter-aware migration generation, allowing Recollect to work with different database backends (PostgreSQL, libSQL).

Usage

# In a migration file
defmodule MyApp.Repo.Migrations.CreateRecollectTables do
  use Ecto.Migration

  def up do
    Recollect.MigrationGenerator.generate_up(Recollect.DatabaseAdapter.LibSQL, dimensions: 768)
  end

  def down do
    Recollect.MigrationGenerator.generate_down()
  end
end

Summary

Functions

Generates the down migration content for dropping all Recollect tables.

Generates the up migration content for creating all Recollect tables.

Functions

generate_down(opts \\ [])

Generates the down migration content for dropping all Recollect tables.

generate_up(adapter \\ Config.adapter(), opts \\ [])

Generates the up migration content for creating all Recollect tables.

Options

  • :dimensions — Vector embedding dimensions (default: 1536)
  • :table_prefix — Table prefix (default: "recollect_")