Skip to content

Change code references from code_review_notes to code_review_comments - #48136

Merged
molly-moen merged 1 commit into
stagingfrom
molly/rename_code_review_notes
Sep 19, 2022
Merged

Change code references from code_review_notes to code_review_comments#48136
molly-moen merged 1 commit into
stagingfrom
molly/rename_code_review_notes

Conversation

@molly-moen

@molly-moen molly-moen commented Sep 16, 2022

Copy link
Copy Markdown
Contributor

Change code references from code_review_notes table tocode_review_comments. code_review_comments makes more sense, but was previously the name of a v1 table. Now that table has been dropped we can use the name for v2.

This PR changes all the code references from code_review_notes to code_review_comments. There will be a follow up once this is deployed to change the table name itself.

Links

Testing story

Tested that creating, deleting and getting comments still worked, and that all unit tests pass.

Follow-up work

Rename the table in the database.

@molly-moen molly-moen changed the title Rename code_review_notes to code_review_comments Change code references from code_review_notes to code_review_comments Sep 16, 2022
@molly-moen
molly-moen requested review from a team September 16, 2022 22:19
@molly-moen
molly-moen marked this pull request as ready for review September 16, 2022 22:19
# removed.
class CodeReviewComment < ApplicationRecord
# TODO: rename the table to code_review_notes
self.table_name = :code_review_notes

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.

TIL you can have a table with a different name than its model!

@molly-moen
molly-moen merged commit 199b455 into staging Sep 19, 2022
@molly-moen
molly-moen deleted the molly/rename_code_review_notes branch September 19, 2022 21:13
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