refactor(db): rename identity columns and tRPC input away from kanidm #215

Öppen
supernaut vill sammanfoga 1 incheckning från refactor/identity-columns in i main
Ägare

Removes the Kanidm name from storage and the API. Values are usernames and do not change.

Changes

  • Migration 0019_identity_columns renames in place with RENAME COLUMN, no data copied:
    • customer.kanidm_ref to identity_ref
    • complimentary.kanidm_ref to identity_ref
    • seat_assignment.kanidm_user to identity_user
    • constraint customer_kanidm_ref_unique to customer_identity_ref_unique
  • The two partial unique indexes keep their names. Postgres follows the column rename.
  • tRPC input kanidmUser is now identityUser (StartCheckoutInput, WithdrawInput, BillingEmailInput, ReplaceCardInput, IdentityUserInput, formerly KanidmUserInput). Breaking wire change.
  • Schema, queries, CLI, entitlements, tests and README updated. Prose that named Kanidm now says Keycloak or identity provider.
  • Old migrations and snapshots keep the old names. They are history.

Deploy

  1. Run node dist/src/migrate.js before starting the new image.
  2. Update the caller to send identityUser in the same window. The service is disabled, so there is no live traffic.

Rollback

Drizzle has no down migrations. The reverse renames are in the README under Migrations. Tested in a transaction against Postgres 17.

Verification

  • Applied 0019 to a database holding rows at 0018: rows, unique constraint and partial indexes intact.
  • pnpm typecheck, pnpm lint, pnpm test (800 passed, with TEST_DATABASE_URL).
  • drizzle-kit generate reports no schema changes after the hand-edited SQL.

No version bump.

Versions: service 0.20.0 to 0.21.0, contract 0.15.0 to 0.16.0 (breaking input rename). This is the release PR for the batch.

Closes #113

Removes the Kanidm name from storage and the API. Values are usernames and do not change. ## Changes - Migration `0019_identity_columns` renames in place with `RENAME COLUMN`, no data copied: - `customer.kanidm_ref` to `identity_ref` - `complimentary.kanidm_ref` to `identity_ref` - `seat_assignment.kanidm_user` to `identity_user` - constraint `customer_kanidm_ref_unique` to `customer_identity_ref_unique` - The two partial unique indexes keep their names. Postgres follows the column rename. - tRPC input `kanidmUser` is now `identityUser` (`StartCheckoutInput`, `WithdrawInput`, `BillingEmailInput`, `ReplaceCardInput`, `IdentityUserInput`, formerly `KanidmUserInput`). Breaking wire change. - Schema, queries, CLI, entitlements, tests and README updated. Prose that named Kanidm now says Keycloak or identity provider. - Old migrations and snapshots keep the old names. They are history. ## Deploy 1. Run `node dist/src/migrate.js` before starting the new image. 2. Update the caller to send `identityUser` in the same window. The service is disabled, so there is no live traffic. ## Rollback Drizzle has no down migrations. The reverse renames are in the README under Migrations. Tested in a transaction against Postgres 17. ## Verification - Applied 0019 to a database holding rows at 0018: rows, unique constraint and partial indexes intact. - `pnpm typecheck`, `pnpm lint`, `pnpm test` (800 passed, with `TEST_DATABASE_URL`). - `drizzle-kit generate` reports no schema changes after the hand-edited SQL. No version bump. Versions: service 0.20.0 to 0.21.0, contract 0.15.0 to 0.16.0 (breaking input rename). This is the release PR for the batch. Closes #113
supernaut lade till 1 incheckning 2026-11-30 09:05:55 +00:00
refactor(db): rename identity columns and tRPC input away from kanidm
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m17s
12ae25d594
Rename customer.kanidm_ref, complimentary.kanidm_ref and
seat_assignment.kanidm_user with RENAME COLUMN, plus the unique
constraint on customer. Rename the tRPC input kanidmUser to
identityUser. Values are unchanged.

Closes #113
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m17s
Obligatorisk
Detaljer
den här ändringsförfrågan är blockerad eftersom den är föråldrad.
Den här grenen är föråldrad gentemot basgrenen
Du är inte behörig att sammanfoga den här ändringsförfrågan.
Visa kommandoradsinstruktioner

Checka ut

Checka ut en ny gren från din projektkatalog och testa ändringarna.
git fetch -u origin 'refactor/identity-columns:refactor/identity-columns'
git switch 'refactor/identity-columns'
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-payment!215
Ingen beskrivning angiven.