PhoenixKit.Migrations.Postgres.V110 (phoenix_kit v1.7.107)

Copy Markdown View Source

V110: Add language column to phoenix_kit_doc_templates.

Each Document Creator template represents a single Google Doc, which is inherently single-language (translations live in separate templates). Storing the locale on the template lets parent apps fill template variables in the matching language regardless of the admin's UI locale.

  • language (VARCHAR(10), nullable) — full locale code ("en-US", "et-EE", "ja", etc.) sourced from PhoenixKit.Modules.Languages. Nullable so existing rows survive without a backfill; the form pre-selects the project's primary language for new templates and callers can update the value at any time.

Documents intentionally do not get a language column — they inherit language from template_uuid → templates.language.

All operations are idempotent.

Summary

Functions

down(opts)

up(opts)