Skip to content

Conversation

@evanhutnik
Copy link
Contributor

Summary

Updating the db migration for the changes I just merged to not perform the backfill as a sql update operation.

While this works fine in dev and locally, the scale of prod results in a bunch of locks while the large amount of messages are updating.

We don't even need to backfill this stuff, as all the logic for fetching contact names is a coalesce on the email_contacts table anyway. The backfill was just putting what was already in email_contacts into the email_message / email_recipients table.

I ran the old migration in dev already so i'll manually revert the changes it made, update the _sqlx_migrations table accordingly, and rerun this new migration.

The prod one I cancelled midway through so it effectively didn't run, so no changes are needed there.

Screenshots, GIFs, and Videos

@evanhutnik evanhutnik merged commit 111a1f1 into main Dec 4, 2025
35 checks passed
@evanhutnik evanhutnik deleted the evan/update-migration branch December 4, 2025 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants