-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
4: [ART] Make POA request and form adjustments migration (#19997)
* 1 Removed old indices from ar_power_of_attorney_forms 2 Removed obsolete columns: city_bidx, state_bidx, zipcode_bidx 3 Added new columns: claimant_city_ciphertext, claimant_city_bidx, claimant_state_code_ciphertext, claimant_state_code_bidx, claimant_zip_code_ciphertext, claimant_zip_code_bidx 4 Added a new index for claimant_city_bidx, claimant_state_code_bidx, and claimant_zip_code_bidx 5 Added claimant_type column to ar_power_of_attorney_requests * (fix) rerun migrations and update db/schema.rb --------- Co-authored-by: OJ Bucao <[email protected]>
- Loading branch information
Showing
6 changed files
with
46 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
...ited_representative_portal/db/migrate/20241227212839_remove_old_indices_from_poa_forms.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,6 @@ | ||
class RemoveOldIndicesFromPoaForms < ActiveRecord::Migration[7.1] | ||
def change | ||
remove_index :ar_power_of_attorney_forms, name: 'idx_on_city_bidx_state_bidx_zipcode_bidx_a85b76f9bc', column: [:city_bidx, :state_bidx, :zipcode_bidx] | ||
remove_index :ar_power_of_attorney_forms, name: 'index_ar_power_of_attorney_forms_on_zipcode_bidx', column: :zipcode_bidx | ||
end | ||
end |
5 changes: 5 additions & 0 deletions
5
...credited_representative_portal/db/migrate/20241227212922_remove_columns_from_poa_forms.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,5 @@ | ||
class RemoveColumnsFromPoaForms < ActiveRecord::Migration[7.1] | ||
def change | ||
safety_assured { remove_columns :ar_power_of_attorney_forms, :city_bidx, :state_bidx, :zipcode_bidx, type: :string } | ||
end | ||
end |
12 changes: 12 additions & 0 deletions
12
...es/accredited_representative_portal/db/migrate/20241227212942_add_columns_to_poa_forms.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,12 @@ | ||
class AddColumnsToPoaForms < ActiveRecord::Migration[7.1] | ||
def change | ||
add_column :ar_power_of_attorney_forms, :claimant_city_ciphertext, :string, null: false | ||
add_column :ar_power_of_attorney_forms, :claimant_city_bidx, :string, null: false | ||
|
||
add_column :ar_power_of_attorney_forms, :claimant_state_code_ciphertext, :string, null: false | ||
add_column :ar_power_of_attorney_forms, :claimant_state_code_bidx, :string, null: false | ||
|
||
add_column :ar_power_of_attorney_forms, :claimant_zip_code_ciphertext, :string, null: false | ||
add_column :ar_power_of_attorney_forms, :claimant_zip_code_bidx, :string, null: false | ||
end | ||
end |
9 changes: 9 additions & 0 deletions
9
.../accredited_representative_portal/db/migrate/20241227213018_add_new_index_to_poa_forms.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,9 @@ | ||
class AddNewIndexToPoaForms < ActiveRecord::Migration[7.1] | ||
disable_ddl_transaction! | ||
|
||
def change | ||
add_index :ar_power_of_attorney_forms, | ||
[:claimant_city_bidx, :claimant_state_code_bidx, :claimant_zip_code_bidx], | ||
algorithm: :concurrently | ||
end | ||
end |
5 changes: 5 additions & 0 deletions
5
...ited_representative_portal/db/migrate/20241227213059_add_claimant_type_to_poa_requests.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,5 @@ | ||
class AddClaimantTypeToPoaRequests < ActiveRecord::Migration[7.1] | ||
def change | ||
add_column :ar_power_of_attorney_requests, :claimant_type, :string, null: false | ||
end | ||
end |