forked from moredip/caseflow-certification
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hearing to original_request_type/changed_request_type database fi…
…elds and accompanying code (#16049) Resolves #15880 ### Description Renamed `original_request_type` to `original_hearing_request_type` and `changed_request_type` to `changed_hearing_request_type` in the database and throughout the codebase. ### Acceptance Criteria - [ ] Code compiles correctly ### Database Changes * [ ] Column comments updated * [ ] Have your migration classes inherit from `Caseflow::Migration`, especially when adding indexes (use `add_safe_index`) * [ ] Verify that `migrate:rollback` works as desired ([`change` supported functions](https://edgeguides.rubyonrails.org/active_record_migrations.html#using-the-change-method)) * [ ] Query profiling performed (eyeball Rails log, check bullet and fasterer output) * [ ] Appropriate indexes added (especially for foreign keys, polymorphic columns, unique constraints, and Rails scopes) * [ ] DB schema docs updated with `make docs` (after running `make migrate`) * [ ] #appeals-schema notified with summary and link to this PR
- Loading branch information
1 parent
95f5aec
commit c4e7af1
Showing
18 changed files
with
126 additions
and
94 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
14 changes: 14 additions & 0 deletions
14
db/migrate/20210324184347_rename_changed_request_type_to_changed_hearing_request_type.rb
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class RenameChangedRequestTypeToChangedHearingRequestType < Caseflow::Migration | ||
def up | ||
safety_assured do | ||
rename_column :appeals, :changed_request_type, :changed_hearing_request_type | ||
rename_column :legacy_appeals, :changed_request_type, :changed_hearing_request_type | ||
end | ||
end | ||
def down | ||
safety_assured do | ||
rename_column :appeals, :changed_hearing_request_type, :changed_request_type | ||
rename_column :legacy_appeals, :changed_hearing_request_type, :changed_request_type | ||
end | ||
end | ||
end |
14 changes: 14 additions & 0 deletions
14
db/migrate/20210324184415_rename_original_request_type_to_original_hearing_request_type.rb
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class RenameOriginalRequestTypeToOriginalHearingRequestType < Caseflow::Migration | ||
def up | ||
safety_assured do | ||
rename_column :appeals, :original_request_type, :original_hearing_request_type | ||
rename_column :legacy_appeals, :original_request_type, :original_hearing_request_type | ||
end | ||
end | ||
def down | ||
safety_assured do | ||
rename_column :appeals, :original_hearing_request_type, :original_request_type | ||
rename_column :legacy_appeals, :original_hearing_request_type, :original_request_type | ||
end | ||
end | ||
end |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.