Skip to content

PhoenixKit 1.7.160: Migration V122 fixed on older databases

PhoenixKit 1.7.160 fixes migration V122 on older databases, where mix phoenix_kit.update stopped with an undefined_table error.

The locations table was added to migration V91 after V91 had already been released. Databases that ran V91 before that never got the table, and V122, which links to it, failed. V122 now creates the locations table first when it is missing, and does nothing extra where it exists.

Upgrading

If an update stopped at V122, update the dependency and run mix phoenix_kit.update again.

Full release notes: PhoenixKit 1.7.160

1.7.160 · 17 June 2026

Fixed

  • V122 migration on pre-locations databases (issue #598) — V122 creates phoenix_kit_location_spaces with a required FK to phoenix_kit_locations, a table created only in V91. Because the locations tables were added to an already-released v91.ex, any database that passed V91 before that addition never received the parent table, so V122 aborted the whole migration transaction with 42P01 undefined_table. V122.up/1 now create_if_not_exists-backfills phoenix_kit_locations (mirroring V91’s final shape) before building the FK — an idempotent no-op where V91 already created it, and a repair where it was missing.

PhoenixKit 1.7.160. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.