Generates a single Ecto migration that runs CREATE EXTENSION for the
Postgres extensions pgflow relies on.
Defaults to: citext, pg_trgm, pgcrypto, pg_cron.
Pairs with mix pgflow.setup (installs the pgflow schema) and
mix pgflow.gen.pgmq_migration (installs pgmq via SQL-only method,
which is the portable path for pgmq since most Postgres distributions
don't ship it as a native extension).
Usage
mix pgflow.gen.postgres_extensions_migration
mix pgflow.gen.postgres_extensions_migration --repo MyApp.OtherRepo
mix pgflow.gen.postgres_extensions_migration --no-cronOptions
--repo- Ecto repo module to generate the migration for. Defaults to the first entry inconfig :my_app, ecto_repos: [...].--no-cron- Skippg_cron. Use on managed Postgres hosts that don't permit it. Default:pg_cronis included (pgflow schedules cron-based flows via pg_cron).
pgmq note
pgmq is NOT included in this task. On most Postgres distributions
pgmq isn't available as a native extension — use
mix pgflow.gen.pgmq_migration to install it via SQL-only method.
On environments where pgmq IS pre-built (Supabase,
atlas-postgres-pgflow), hand-edit the generated migration to add
execute("CREATE EXTENSION IF NOT EXISTS pgmq").
Migration order
This migration should run BEFORE mix pgflow.gen.pgmq_migration's
output and before mix pgflow.setup's output:
install_extensions(this task)install_pgmq(frommix pgflow.gen.pgmq_migration, if needed)setup_pgflow(frommix pgflow.setup)