Skip to content

fix(migrations): convert duplicate email_events CREATE to ALTER TABLE#45

Merged
dviejokfs merged 1 commit intomainfrom
fix/migration-email-events
Mar 29, 2026
Merged

fix(migrations): convert duplicate email_events CREATE to ALTER TABLE#45
dviejokfs merged 1 commit intomainfrom
fix/migration-email-events

Conversation

@dviejokfs
Copy link
Copy Markdown
Contributor

Summary

  • The email_events table was being created by two migrations: m20260320 (email tracking) and m20260328 (SNS webhook support)
  • Changed m20260328 from CREATE TABLE IF NOT EXISTS to ALTER TABLE ADD COLUMN IF NOT EXISTS for the 3 missing columns (provider_message_id, recipient, metadata)
  • Fixes 72 test failures in temps-deployments and 3 in temps-analytics caused by migration conflicts after merging PR feat(compose): add Docker Compose stack management #41

Test plan

  • cargo test --lib -p temps-deployments — 304 passed, 0 failed
  • cargo test --lib -p temps-analytics — 22 passed, 0 failed
  • cargo check --lib — clean
  • clippy passes

The email_events table is already created by m20260320 (email tracking).
Migration m20260328 was attempting to CREATE TABLE again with different
columns. Changed to ALTER TABLE ADD COLUMN IF NOT EXISTS for the missing
provider_message_id, recipient, and metadata columns.
@dviejokfs dviejokfs merged commit 3c223b1 into main Mar 29, 2026
4 of 6 checks passed
@dviejokfs dviejokfs deleted the fix/migration-email-events branch March 29, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant