mule/tasks/gen_migration

Generate Mule migration files for an external migration runner.

Run: gleam run -m mule/tasks/gen_migration -- <dir> [--format cigogne|plain] [--prefix <schema>]

Reads the versioned SQL from mule/engines/postgres/migration and writes one file per schema version into

, in the chosen tool’s convention. The runner (cigogne, dbmate, psql, …) owns sequencing on this path, so there is no comment-ledger here — that belongs to migration.migrate.

--prefix qualifies every table with a Postgres schema other than public (Oban’s prefix: option); the first file then also creates the schema. Pair it with the engine’s new_with_prefix.

Types

Output conventions. Add a tool by adding a variant plus a render clause; migration never changes.

pub type Format {
  Cigogne
  PlainSql
}

Constructors

  • Cigogne
  • PlainSql

Values

pub fn main() -> Nil
Search Document