Skip to content

Add aliases for storage_app_id columns on other tables - #45597

Merged
maureensturgeon merged 4 commits into
stagingfrom
maureen/LP-2272-storage-apps-cleanup
Apr 1, 2022
Merged

Add aliases for storage_app_id columns on other tables#45597
maureensturgeon merged 4 commits into
stagingfrom
maureen/LP-2272-storage-apps-cleanup

Conversation

@maureensturgeon

@maureensturgeon maureensturgeon commented Mar 31, 2022

Copy link
Copy Markdown
Contributor

The table pegasus.storage_apps has been migrated to dashboard.projects (#45480), however there are still many tables that have columns named storage_app_id, pointing to the ids in the dashboard.projects table. Instead of renaming all of these columns right now, to reduce confusion in the code, an alias project_id has been added to the active record models which will allow us to reference project_id instead of storage_app_id in the code. This change has been applied to

  • ReviewableProject
  • CodeReviewComments
  • ProjectVersions
  • FeaturedProjects

Links

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:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@maureensturgeon
maureensturgeon marked this pull request as ready for review April 1, 2022 16:46
@maureensturgeon
maureensturgeon requested review from a team April 1, 2022 16:46

@maureensturgeon maureensturgeon left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tagged @code-dot-org/csa since I believe you own a couple of these tables

@bethanyaconnor bethanyaconnor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

@maureensturgeon
maureensturgeon merged commit aca1613 into staging Apr 1, 2022
@maureensturgeon
maureensturgeon deleted the maureen/LP-2272-storage-apps-cleanup branch April 1, 2022 20:53
@bencodeorg

Copy link
Copy Markdown
Contributor

🎉 so great!

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.

3 participants