Fix migration branching error for google_calendar_channels#1655
Merged
Conversation
ryanjjung
approved these changes
Apr 28, 2026
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.
What changed?
time_createdandtime_updatedto the existingadd_google_calendar_channelsmigrationadd_state_to_google_calendarmigration so that the table can be created before the state is addedWhy?
The
time_createdandtime_updatedfields are defined on the SQLAlchemy model but not in the migration, so when we run the db creation methods from scratch when blowing up our local envs, it creates the correct tables from the model definitions.However, if the DB already exists (ran on this during stage testing and would happen in prod too), these columns wouldn't exist since they are not defined in the migration explicitly.
Also, there was an ordering bug on the migrations which made the
add-columnrun before thecreate-table. Added an extra migration to stay on the safe side to make sure that the missing columns will be there.Related PRs
#1529