mix localize.ecto.audit (Localize SQL v1.0.0)

Copy Markdown View Source

Audits the PostgreSQL server's collation and Unicode state against the running application.

mix localize.ecto.audit
mix localize.ecto.audit -r MyApp.Repo

Reports, for each configured repo:

  • ICU and libc collations whose recorded version differs from the current collation library — with the indexes that depend on them and the REINDEX / ALTER COLLATION … REFRESH VERSION statements that remediate the drift.

  • Database default collation version drift.

  • The server's PostgreSQL/Unicode/ICU versions versus the application's CLDR version.

  • Time zone names the application knows but the server does not (and the reverse).

Exits with a non-zero status when any collation drift is found, so the task can gate CI or deploys.

Command line options

  • -r, --repo — the repo to audit. Defaults to the application's configured ecto_repos. May be given more than once.