feat(db): webhook tables migration (DEV-44)#11
Merged
Conversation
- New migration 000002 for the webhook system (DEV-44) - webhook_deliveries is the outbox: status, attempts, next_attempt_at - Partial index on next_attempt_at WHERE status='pending' for the poll loop - ON DELETE CASCADE from deliveries to their registration - uuid_generate_v4 + IF NOT EXISTS to match existing schema conventions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes DEV-44. First ticket of the webhook epic (DEV-40); unblocks DEV-45/46/47.
Adds migration
000002_webhookswith two tables:webhook_registrations— url + encrypted secret per callerwebhook_deliveries— outbox (event, asset_id, job_id, payload, status, attempts, next_attempt_at, delivered_at), partial index onnext_attempt_at WHERE status='pending'for the delivery pollNotes
uuid_generate_v4()+IF NOT EXISTSto match the existing schema and the dual Go/Python migration runners.ON DELETE CASCADEfrom deliveries → registration;asset_id/job_idkept as plain columns (outbox is an independent ledger).🤖 Generated with Claude Code