fix(db): forward-fix idea_notifications.kind to ClaudeJobKind enum (replay safety) #54
No reviewers
Labels
No labels
severity/s3
severity/s4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
janpeter/Scrum4Me!54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/idea-notifications-kind-enum-replay"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to the prod migration incident on 2026-05-28.
Background
prisma migrate deployfailed with P3018 (relation "idea_notifications" already exists). Root cause: migration20260528174647_add_idea_notificationsre-creates a table that already existed (the original creating migration was removed from history), and it declareskind **TEXT**while schema.prisma + the live DB use the ClaudeJobKind enum. Prod was unblocked withprisma migrate resolve --applied 20260528174647_add_idea_notifications(the live schema already matched schema.prisma; no SQL ran).migrate status→ up to date.Why this PR (and why not edit the original)
The applied migration's checksum is recorded in
_prisma_migrations; editing its.sqlwould change the checksum and makeprisma migrate deployreject it — re-breaking deploys. Prisma migrations are append-only, so this is a forward-fix.What
A new migration that converts
idea_notifications.kindto theClaudeJobKindenum only if it is currently TEXT. On current prod (already enum) it is a no-op (no table rewrite, zero risk); on a from-scratch replay (where 20260528174647 created it as TEXT) it converts the column so the final schema matches schema.prisma. The cast is identity on existing values.Applied automatically by the next
update_scrum4me_webdeploy.