Scrum4Me/prisma/migrations
Madhura68 075cf28a5e feat(ST-1001): add LoginPairing model + pg_notify trigger via migration
Schema (prisma/schema.prisma):
- model LoginPairing met id (cuid), secret_hash + desktop_token_hash (beide NOT
  NULL — scheiden mobiel- en desktop-bewijs), status (pending|approved|consumed
  |cancelled), optionele user_id met onDelete: SetNull, desktop_ua VarChar(255),
  desktop_ip VarChar(45) voor IPv6, created_at + expires_at + approved_at +
  consumed_at, indexes op (expires_at) en (status, expires_at)
- back-relation login_pairings LoginPairing[] op User

Migratie (20260427200734_add_login_pairing):
- Prisma-gegenereerde DDL voor login_pairings + indexes + FK
- Toegevoegde notify_pairing_change() functie + login_pairings_notify trigger
  op AFTER INSERT/UPDATE; emit pg_notify('scrum4me_pairing', payload) met
  { op: 'I'|'U', pairing_id, status }
- DELETE niet ondersteund — pairings gaan naar consumed/cancelled, niet weg
- Channel naam analoog aan scrum4me_changes uit ST-801

Verification: Node pg-client roundtrip-test via DATABASE_URL toonde notifies bij
INSERT (op=I) en UPDATE (op=U) met correcte payload-shape.

Bouwt voort op M8 LISTEN/NOTIFY-infra. SSE-route /api/auth/pair/stream/[id] in
ST-1004 abonneert hierop.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 22:10:51 +02:00
..
20260424123750_init fix: SQLite migraties vervangen door PostgreSQL migratie voor Neon 2026-04-24 14:38:01 +02:00
20260425102419_add_task_implementation_plan feat: ProductMember — team management for product backlogs 2026-04-25 13:09:44 +02:00
20260425103147_add_todo_product_id feat: Todo altijd gekoppeld aan product backlog 2026-04-25 12:35:40 +02:00
20260425110346_add_product_members feat: ProductMember — team management for product backlogs 2026-04-25 13:09:44 +02:00
20260425112843_add_user_profile feat: gebruikersprofiel met avatar, bio en uitgebreide beschrijving 2026-04-25 13:30:38 +02:00
20260425210710_add_review_task_status feat(ST-350): add Story.assignee_id schema migration 2026-04-26 16:03:29 +02:00
20260426140229_add_story_assignee feat(ST-350): add Story.assignee_id schema migration 2026-04-26 16:03:29 +02:00
20260426193458_add_user_email feat(ST-507): add optional email field to User schema 2026-04-26 19:37:38 +02:00
20260426195800_add_todo_description feat(ST-509): add optional description column (max 2000 chars) to Todo 2026-04-26 19:59:52 +02:00
20260426202231_add_entity_codes feat(ST-507): add optional code fields to Product, Pbi and Story 2026-04-26 20:36:26 +02:00
20260426214905_add_story_log_metadata Todo description, entity codes, REST API extensions and Claude Code hardening (ST-509/511/512/513) (#2) 2026-04-26 23:40:54 +02:00
20260426230316_add_solo_realtime_triggers feat(M8): Realtime Solo Paneel via Postgres LISTEN/NOTIFY (ST-801..ST-806) (#8) 2026-04-27 13:59:32 +02:00
20260427000216_extend_realtime_payload feat(M8): Realtime Solo Paneel via Postgres LISTEN/NOTIFY (ST-801..ST-806) (#8) 2026-04-27 13:59:32 +02:00
20260427165329_add_user_active_product_id feat(M9): active product backlog — persistent active PB, NavBar splits, sprint card styling (#10) 2026-04-27 20:25:13 +02:00
20260427200734_add_login_pairing feat(ST-1001): add LoginPairing model + pg_notify trigger via migration 2026-04-27 22:10:51 +02:00
migration_lock.toml fix: SQLite migraties vervangen door PostgreSQL migratie voor Neon 2026-04-24 14:38:01 +02:00