Add aliases for storage_app_id columns on other tables - #45597
Merged
Conversation
maureensturgeon
marked this pull request as ready for review
April 1, 2022 16:46
maureensturgeon
commented
Apr 1, 2022
maureensturgeon
left a comment
Contributor
Author
There was a problem hiding this comment.
I've tagged @code-dot-org/csa since I believe you own a couple of these tables
bethanyaconnor
approved these changes
Apr 1, 2022
bethanyaconnor
left a comment
Contributor
There was a problem hiding this comment.
Thanks for doing this!
Contributor
|
🎉 so great! |
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.
The table
pegasus.storage_appshas been migrated todashboard.projects(#45480), however there are still many tables that have columns namedstorage_app_id, pointing to the ids in thedashboard.projectstable. Instead of renaming all of these columns right now, to reduce confusion in the code, an aliasproject_idhas been added to the active record models which will allow us to referenceproject_idinstead ofstorage_app_idin the code. This change has been applied toLinks
Testing story
Tested locally that I was able to query for data and update it by the alias. (Also tests passed)
Follow-up work
The following tables also have storage_app_id column: Backpacks, ChannelTokens. I wanted to limit the scope of this PR so I didn't include those changes here. Also I need to rename StorageApps class and update remaining references.
#45612
PR Checklist: