mix phoenix_kit.gen.migration (phoenix_kit v1.7.192)

Copy Markdown View Source

Generate a PhoenixKit versioned migration for the parent application.

Scans existing migrations in priv/repo/migrations/ to determine the current PhoenixKit version, then generates a migration that upgrades to the latest version.

Usage

mix phoenix_kit.gen.migration

Options

  • --prefix - Database schema prefix. When omitted, resolves from config :phoenix_kit, :prefix, then defaults to "public" (validated: [a-z_][a-z0-9_]*). The generated migration passes create_schema: true only for a fresh install (no prior PhoenixKit migration in the project) with a non-public prefix.

Examples

# Generate upgrade migration with default prefix
mix phoenix_kit.gen.migration

# Generate with custom schema prefix
mix phoenix_kit.gen.migration --prefix my_schema