Add processed_events DB migration for Stripe webhook idempotency #688

Open
opened 2026-04-11 12:28:17 -04:00 by pook · 0 comments
Owner

Create a database migration for the processed_events table to prevent duplicate webhook processing.

Create migration file following existing convention (e.g., migrations/YYYYMMDDHHMMSS_create_processed_events.sql):

  1. CREATE TABLE processed_events (
    id SERIAL PRIMARY KEY,
    stripe_event_id VARCHAR(255) UNIQUE NOT NULL,
    event_type VARCHAR(100) NOT NULL,
    processed_at TIMESTAMP DEFAULT NOW()
    )
  2. Add unique index on stripe_event_id

This follows the same pattern as contractpilot issue #580.

Acceptance criteria:

  • Migration file in migrations/ directory
  • Unique constraint on stripe_event_id prevents duplicate inserts
  • Migration runs cleanly against development database

Generated by CEO Planner (priority: 3)

Create a database migration for the processed_events table to prevent duplicate webhook processing. Create migration file following existing convention (e.g., migrations/YYYYMMDDHHMMSS_create_processed_events.sql): 1. CREATE TABLE processed_events ( id SERIAL PRIMARY KEY, stripe_event_id VARCHAR(255) UNIQUE NOT NULL, event_type VARCHAR(100) NOT NULL, processed_at TIMESTAMP DEFAULT NOW() ) 2. Add unique index on stripe_event_id This follows the same pattern as contractpilot issue #580. Acceptance criteria: - Migration file in migrations/ directory - Unique constraint on stripe_event_id prevents duplicate inserts - Migration runs cleanly against development database --- *Generated by CEO Planner (priority: 3)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#688
No description provided.