Skip to content

Commit

Permalink
database updates (#16475)
Browse files Browse the repository at this point in the history
  • Loading branch information
binq committed Apr 25, 2024
1 parent 9f01854 commit 8a4a934
Show file tree
Hide file tree
Showing 15 changed files with 234 additions and 25 deletions.
@@ -0,0 +1,20 @@
# This migration comes from vye (originally 20240303145700)
class RemoveSsnAndIcnFromVyeTables < ActiveRecord::Migration[7.0]
def change
safety_assured do
remove_columns(
:vye_user_infos,
:icn,
:ssn_ciphertext,
:ssn_digest
)

remove_columns(
:vye_pending_documents,
:claim_no_ciphertext,
:ssn_ciphertext,
:ssn_digest
)
end
end
end
@@ -0,0 +1,17 @@
# This migration comes from vye (originally 20240305034315)
class RemoveAddressDetailsFromVyeUserInfos < ActiveRecord::Migration[7.0]
def change
safety_assured do
remove_columns(
:vye_user_infos,
:full_name_ciphertext,
:address_line2_ciphertext,
:address_line3_ciphertext,
:address_line4_ciphertext,
:address_line5_ciphertext,
:address_line6_ciphertext,
:zip_ciphertext
)
end
end
end
16 changes: 16 additions & 0 deletions db/migrate/20240424132508_change_datetime_to_date.vye.rb
@@ -0,0 +1,16 @@
# This migration comes from vye (originally 20240415205522)
class ChangeDatetimeToDate < ActiveRecord::Migration[7.1]
def change
safety_assured do
change_column :vye_awards, :award_begin_date, :date
change_column :vye_awards, :award_end_date, :date
change_column :vye_awards, :payment_date, :date

change_column :vye_pending_documents, :queue_date, :date

change_column :vye_user_infos, :cert_issue_date, :date
change_column :vye_user_infos, :del_date, :date
change_column :vye_user_infos, :date_last_certified, :date
end
end
end
15 changes: 15 additions & 0 deletions db/migrate/20240424132509_update_verifications.vye.rb
@@ -0,0 +1,15 @@
# This migration comes from vye (originally 20240415220728)
class UpdateVerifications < ActiveRecord::Migration[7.1]
disable_ddl_transaction!

def change
add_column :vye_verifications, :user_profile_id, :integer
add_column :vye_verifications, :monthly_rate, :decimal
add_column :vye_verifications, :number_hours, :integer
add_column :vye_verifications, :payment_date, :date
add_column :vye_verifications, :transact_date, :date
add_column :vye_verifications, :trace, :string

add_index :vye_verifications, :user_profile_id, algorithm: :concurrently
end
end
15 changes: 15 additions & 0 deletions db/migrate/20240424132510_create_vye_bdn_clones.vye.rb
@@ -0,0 +1,15 @@
# This migration comes from vye (originally 20240422033815)
class CreateVyeBdnClones < ActiveRecord::Migration[7.1]
def change
create_table :vye_bdn_clones do |t|
t.boolean :is_active
t.boolean :export_ready
t.date :transact_date

t.timestamps
end

add_index :vye_bdn_clones, :is_active, unique: true, where: "is_active IS NOT NULL"
add_index :vye_bdn_clones, :export_ready, unique: true, where: "export_ready IS NOT NULL"
end
end
14 changes: 14 additions & 0 deletions db/migrate/20240424132511_add_to_vye_user_infos.vye.rb
@@ -0,0 +1,14 @@
# This migration comes from vye (originally 20240422043836)
class AddToVyeUserInfos < ActiveRecord::Migration[7.1]
disable_ddl_transaction!

def change
add_column :vye_user_infos, :bdn_clone_id, :integer
add_column :vye_user_infos, :bdn_clone_line, :integer
add_column :vye_user_infos, :bdn_clone_active, :boolean

add_index :vye_user_infos, :bdn_clone_id, algorithm: :concurrently
add_index :vye_user_infos, :bdn_clone_line, algorithm: :concurrently
add_index :vye_user_infos, :bdn_clone_active, algorithm: :concurrently
end
end
@@ -0,0 +1,8 @@
# This migration comes from vye (originally 20240422051918)
class RemoveFromVyePendingDocument < ActiveRecord::Migration[7.1]
def change
safety_assured do
remove_column :vye_pending_documents, :encrypted_kms_key
end
end
end
56 changes: 31 additions & 25 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

@@ -0,0 +1,19 @@
class RemoveSsnAndIcnFromVyeTables < ActiveRecord::Migration[7.0]
def change
safety_assured do
remove_columns(
:vye_user_infos,
:icn,
:ssn_ciphertext,
:ssn_digest
)

remove_columns(
:vye_pending_documents,
:claim_no_ciphertext,
:ssn_ciphertext,
:ssn_digest
)
end
end
end
@@ -0,0 +1,16 @@
class RemoveAddressDetailsFromVyeUserInfos < ActiveRecord::Migration[7.0]
def change
safety_assured do
remove_columns(
:vye_user_infos,
:full_name_ciphertext,
:address_line2_ciphertext,
:address_line3_ciphertext,
:address_line4_ciphertext,
:address_line5_ciphertext,
:address_line6_ciphertext,
:zip_ciphertext
)
end
end
end
15 changes: 15 additions & 0 deletions modules/vye/db/migrate/20240415205522_change_datetime_to_date.rb
@@ -0,0 +1,15 @@
class ChangeDatetimeToDate < ActiveRecord::Migration[7.1]
def change
safety_assured do
change_column :vye_awards, :award_begin_date, :date
change_column :vye_awards, :award_end_date, :date
change_column :vye_awards, :payment_date, :date

change_column :vye_pending_documents, :queue_date, :date

change_column :vye_user_infos, :cert_issue_date, :date
change_column :vye_user_infos, :del_date, :date
change_column :vye_user_infos, :date_last_certified, :date
end
end
end
14 changes: 14 additions & 0 deletions modules/vye/db/migrate/20240415220728_update_verifications.rb
@@ -0,0 +1,14 @@
class UpdateVerifications < ActiveRecord::Migration[7.1]
disable_ddl_transaction!

def change
add_column :vye_verifications, :user_profile_id, :integer
add_column :vye_verifications, :monthly_rate, :decimal
add_column :vye_verifications, :number_hours, :integer
add_column :vye_verifications, :payment_date, :date
add_column :vye_verifications, :transact_date, :date
add_column :vye_verifications, :trace, :string

add_index :vye_verifications, :user_profile_id, algorithm: :concurrently
end
end
14 changes: 14 additions & 0 deletions modules/vye/db/migrate/20240422033815_create_vye_bdn_clones.rb
@@ -0,0 +1,14 @@
class CreateVyeBdnClones < ActiveRecord::Migration[7.1]
def change
create_table :vye_bdn_clones do |t|
t.boolean :is_active
t.boolean :export_ready
t.date :transact_date

t.timestamps
end

add_index :vye_bdn_clones, :is_active, unique: true, where: "is_active IS NOT NULL"
add_index :vye_bdn_clones, :export_ready, unique: true, where: "export_ready IS NOT NULL"
end
end
13 changes: 13 additions & 0 deletions modules/vye/db/migrate/20240422043836_add_to_vye_user_infos.rb
@@ -0,0 +1,13 @@
class AddToVyeUserInfos < ActiveRecord::Migration[7.1]
disable_ddl_transaction!

def change
add_column :vye_user_infos, :bdn_clone_id, :integer
add_column :vye_user_infos, :bdn_clone_line, :integer
add_column :vye_user_infos, :bdn_clone_active, :boolean

add_index :vye_user_infos, :bdn_clone_id, algorithm: :concurrently
add_index :vye_user_infos, :bdn_clone_line, algorithm: :concurrently
add_index :vye_user_infos, :bdn_clone_active, algorithm: :concurrently
end
end
@@ -0,0 +1,7 @@
class RemoveFromVyePendingDocument < ActiveRecord::Migration[7.1]
def change
safety_assured do
remove_column :vye_pending_documents, :encrypted_kms_key
end
end
end

0 comments on commit 8a4a934

Please sign in to comment.