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

V100: Staff module tables.

Creates four tables used by `phoenix_kit_staff`:

- `phoenix_kit_staff_departments` — top-level org units
- `phoenix_kit_staff_teams` — teams inside a department
- `phoenix_kit_staff_people` — staff profiles, each linked 1:1 to a
  `phoenix_kit_users` row (required FK)
- `phoenix_kit_staff_team_memberships` — join table for team membership

UUIDv7 primary keys, `timestamptz` timestamps, cascading deletes
department → team → team_memberships; person deletion cascades to
team_memberships; user deletion cascades to the staff person profile.

Departments and teams are identified by UUID only — no slug columns.
A team's name must be unique within its department.

# `down`

Drops all four staff tables.

**Lossy rollback:** all staff data (departments, teams, people, and
their team memberships) is permanently destroyed. Back up before
rolling back in production.

# `up`

---

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