# `PhoenixKit.Migrations.Postgres.V69`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.87/lib/phoenix_kit/migrations/postgres/v69.ex#L1)

V69: Make legacy integer FK columns nullable on role tables.

After the UUID cleanup, role schemas only write `user_uuid` / `role_uuid` —
they never set the legacy integer FK columns. Two tables still have these
columns as NOT NULL, causing inserts to fail with not_null_violation.

This was missed in V67 (the broader NOT NULL cleanup migration).

## Columns Fixed

- `phoenix_kit_user_role_assignments.user_id` (NOT NULL → nullable)
- `phoenix_kit_user_role_assignments.role_id` (NOT NULL → nullable)
- `phoenix_kit_role_permissions.role_id` (NOT NULL → nullable)

All operations are idempotent (guarded by table/column existence + NOT NULL checks).

# `down`

# `up`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
