PhoenixKit.Migrations.Postgres.V199 (phoenix_kit v2.40.1)

Copy Markdown View Source

V199: a media file's title, alt text and description, per language.

A file's title and description lived in its metadata map, in whatever language the admin typed, next to rotation, tags and the EXIF/PDF keys; it had no alt text at all. This version adds a column of their own on phoenix_kit_files:

  • data (jsonb, NOT NULL, default {}) — the text per language, %{"en-US" => %{"title" => …, "alt" => …, "description" => …}}

Every language holds its own text and none is marked as primary, so a site that changes its primary language has nothing to convert. PhoenixKit.Modules.Storage.FileDetails is the read and write path; it reads the metadata text of a file saved before this version as its primary-language text, so nothing is backfilled.

Additive only; re-runnable.

Summary

Functions

Rolls V199 back: drops the column. Translations are lost; the copy of the primary-language text in metadata stays.

Functions

down(opts)

Rolls V199 back: drops the column. Translations are lost; the copy of the primary-language text in metadata stays.

up(opts)