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

V75: Fix missing/wrong DEFAULT on `uuid` PK columns, drop orphaned sequence.

V72 renamed `id` → `uuid` on 30 Category A tables, but the old `id` column's
DEFAULT was a `nextval()` sequence — that got dropped during the rename.
This left 27 tables with no DEFAULT on `uuid`. Additionally, 4 tables
(comments module + role_permissions) had `gen_random_uuid()` (UUIDv4) instead
of `uuid_generate_v7()` (UUIDv7).

While Ecto generates UUIDs in the app layer (`autogenerate: true`), a DB-level
DEFAULT is important for:
- Raw SQL inserts (e.g. migration scripts, manual fixes)
- Defensive safety if Ecto doesn't provide a value

## Changes

1. **Set DEFAULT uuid_generate_v7()** on 27 tables missing it (Category A)
2. **Fix DEFAULT** on 4 tables using gen_random_uuid() → uuid_generate_v7()
3. **Drop orphaned sequence** `phoenix_kit_id_seq` (CASCADE — also drops the DEFAULT
   on `phoenix_kit.id` meta table column that references it)

# `down`

# `up`

---

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