index int64 0 0 | repo_id stringclasses 829
values | file_path stringlengths 34 254 | content stringlengths 6 5.38M |
|---|---|---|---|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20250909204906_create_record_metadata.rb | # frozen_string_literal: true
class CreateRecordMetadata < ActiveRecord::Migration[7.2]
def change
create_table :claims_api_record_metadata, id: :uuid do |t|
t.text :metadata_ciphertext, null: false
t.string :record_type, null: false
t.uuid :record_id, null: false
t.timestamps
end
... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240425231435_change_date_to_datetime.vye.rb | class ChangeDateToDatetime < ActiveRecord::Migration[7.1]
def change
safety_assured do
change_column :vye_awards, :award_begin_date, :datetime
change_column :vye_awards, :award_end_date, :datetime
change_column :vye_awards, :payment_date, :datetime
change_column :vye_pending_documents, :q... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20220518234857_change_oauth_sessions_user_verification_null_false.rb | class ChangeOAuthSessionsUserVerificationNullFalse < ActiveRecord::Migration[6.1]
def up
safety_assured do
SignIn::OAuthSession.delete_all
change_column_null :oauth_sessions, :user_verification_id, false
end
end
def down
safety_assured do
change_column_null :oauth_sessions, :user_ve... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20250218222532_add_va_notify_notifications_index.rb | class AddVANotifyNotificationsIndex < ActiveRecord::Migration[7.2]
disable_ddl_transaction!
def change
add_index :va_notify_notifications, :notification_id, algorithm: :concurrently
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240501164741_attempt_may1_change_datetime_to_date.vye.rb | # This migration comes from vye (originally 20240501000102)
class AttemptMay1ChangeDatetimeToDate < ActiveRecord::Migration[7.1]
def change
safety_assured do
remove_column :vye_awards, :award_begin_date, :datetime if column_exists?(:vye_awards, :award_begin_date)
add_column :vye_awards, :award_begin_d... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240621200006_create_form526_submission_remediations.rb | class CreateForm526SubmissionRemediations < ActiveRecord::Migration[7.1]
def change
create_table :form526_submission_remediations do |t|
t.references :form526_submission, null: false, foreign_key: true
t.text :lifecycle, array: true, default: []
t.boolean :success, default: true
t.boolean ... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20221118223800_add_user_account_to_terms_and_conditions.rb | class AddUserAccountToTermsAndConditions < ActiveRecord::Migration[6.1]
def change
safety_assured do
add_reference :terms_and_conditions_acceptances, :user_account, type: :uuid, foreign_key: true, null: true, index: true
end
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20201217223026_add_missing_indexes.rb | class AddMissingIndexes < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
def change
add_index :async_transactions, :created_at, algorithm: :concurrently
add_index :base_facilities, :lat, algorithm: :concurrently
add_index :claims_api_auto_established_claims, :evss_id, algorithm: :concurrently
... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20210723134730_create_supplemental_claims.rb | class CreateSupplementalClaims < ActiveRecord::Migration[6.1]
def change
enable_extension 'uuid-ossp'
enable_extension 'pgcrypto'
create_table :appeals_api_supplemental_claims, id: :uuid do |t|
t.string :encrypted_form_data
t.string :encrypted_form_data_iv
t.string :encrypted_auth_heade... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240417130647_remove_dob_and_ssn_from_veteran_representatives.rb | class RemoveDobAndSsnFromVeteranRepresentatives < ActiveRecord::Migration[7.1]
def change
safety_assured do
remove_column :veteran_representatives, :ssn_ciphertext, :text
remove_column :veteran_representatives, :dob_ciphertext, :text
remove_column :veteran_representatives, :encrypted_kms_key, :t... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20231004001824_remove_verified_decryptable_at_from_all_encrypted_tables.rb | class RemoveVerifiedDecryptableAtFromAllEncryptedTables < ActiveRecord::Migration[6.1]
def change
# appeal_submissions
safety_assured { remove_column :appeal_submissions, :verified_decryptable_at, :datetime }
# appeals_api_evidence_submissions
safety_assured { remove_column :appeals_api_evidence_subm... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20210120175426_add_columns_to_education_stem_automated_decisions.rb | class AddColumnsToEducationStemAutomatedDecisions < ActiveRecord::Migration[6.0]
def change
add_column :education_stem_automated_decisions, :poa, :boolean
add_column :education_stem_automated_decisions, :encrypted_auth_headers_json, :string
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20250519141104_add_enums_to_lighthouse_submission_status.rb | class AddEnumsToLighthouseSubmissionStatus < ActiveRecord::Migration[7.2]
def up
add_enum_value :lighthouse_submission_status, 'failure', if_not_exists: true
add_enum_value :lighthouse_submission_status, 'vbms', if_not_exists: true
add_enum_value :lighthouse_submission_status, 'manually', if_not_exists: t... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240212220851_drop_column_flagged_value_updated_in_flagged_veteran_representative_contact_data_table.rb | class DropColumnFlaggedValueUpdatedInFlaggedVeteranRepresentativeContactDataTable < ActiveRecord::Migration[7.0]
def change
safety_assured { remove_column :flagged_veteran_representative_contact_data, :flagged_value_updated }
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240312162510_add_last_sha256_change_to_va_forms_forms.rb | class AddLastSha256ChangeToVAFormsForms < ActiveRecord::Migration[7.0]
def change
add_column :va_forms_forms, :last_sha256_change, :date
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20250717152023_create_event_bus_gateway_notification.rb | class CreateEventBusGatewayNotification < ActiveRecord::Migration[7.2]
def change
create_table :event_bus_gateway_notifications do |t|
t.references :user_account, null: false, foreign_key: true, type: :uuid
t.string :va_notify_id, null: false
t.string :template_id, null: false
t.timestamps... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20250116155354_create_evidence_submissions.rb | class CreateEvidenceSubmissions < ActiveRecord::Migration[7.2]
def change
create_table :evidence_submissions do |t|
t.string :job_id
t.string :job_class
t.string :request_id
t.string :claim_id
t.references :user_account, null: false, foreign_key: true, type: :uuid
t.json :templ... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20251125140328_add_not_null_to_digital_dispute_submissions_guid.rb | # frozen_string_literal: true
class AddNotNullToDigitalDisputeSubmissionsGuid < ActiveRecord::Migration[7.2]
disable_ddl_transaction!
def change
add_check_constraint :digital_dispute_submissions, 'guid IS NOT NULL', name: 'digital_dispute_submissions_guid_null', validate: false
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20230915223128_add_uploaded_forms_column_to_saved_claims.rb | class AddUploadedFormsColumnToSavedClaims < ActiveRecord::Migration[6.1]
def change
add_column :saved_claims, :uploaded_forms, :string, array: true
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20231024161539_add_index_on_location_to_veteran_organizations.rb | class AddIndexOnLocationToVeteranOrganizations < ActiveRecord::Migration[6.1]
disable_ddl_transaction!
def change
add_index :veteran_organizations, :location, using: :gist, algorithm: :concurrently
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240712185835_drop_accredited_representative_portal_verified_representatives.rb | class DropAccreditedRepresentativePortalVerifiedRepresentatives < ActiveRecord::Migration[7.1]
def change
drop_table :accredited_representative_portal_verified_representatives do |t|
t.string :ogc_registration_number, null: false
t.string :email, null: false
t.timestamps
t.index 'ogc_reg... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20201207172423_create_form1010cg_submissions.rb | class CreateForm1010cgSubmissions < ActiveRecord::Migration[6.0]
def change
create_table :form1010cg_submissions do |t|
# Salesforce record IDs are 15 or 18 characters long
# The 18 digit ID is case insensitive whereas the 15 digit ID is case sensitive
t.string :carma_case_id, null: false, limit... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20231201160018_remove_column_and_index_from_veteran_organizations_table.rb | class RemoveColumnAndIndexFromVeteranOrganizationsTable < ActiveRecord::Migration[6.1]
def change
safety_assured { remove_column :veteran_organizations, :representative_number }
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20210215155459_add_column_active_storage_to_upload_submission.rb | class AddColumnActiveStorageToUploadSubmission < ActiveRecord::Migration[6.0]
def change
add_column :vba_documents_upload_submissions, :use_active_storage, :boolean, default: false
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20220915172901_add_mhv_opt_in_flags.rb | class AddMHVOptInFlags < ActiveRecord::Migration[6.1]
def change
create_table :mhv_opt_in_flags do |t|
t.string :user_account_uuid, null: false
t.string :opt_in_flag, null: false
t.index [ "user_account_uuid" ], unique: false
t.index [ "opt_in_flag" ], unique: false
t.timestamps
... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20241016171432_drop_upload_submission_status_created_at_index.rb | class DropUploadSubmissionStatusCreatedAtIndex < ActiveRecord::Migration[7.1]
disable_ddl_transaction!
def change
remove_index "vba_documents_upload_submissions", column: [:status, :created_at], name: "index_vba_docs_upload_submissions_status_created_at", where: "s3_deleted IS NOT TRUE", if_exists: true
end
... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20220727124515_adds_cid_to_poa_table.rb | class AddsCidToPoaTable < ActiveRecord::Migration[6.1]
def change
add_column :claims_api_power_of_attorneys, :cid, :string
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240223183025_create_flipper_tables.rb | class CreateFlipperTables < ActiveRecord::Migration[7.0]
def change
# This file is need to prevent 'rails generate flipper:update' from creating another migration file
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20201205223834_add_covid_registration_submissions.rb | class AddCovidRegistrationSubmissions < ActiveRecord::Migration[6.0]
def change
create_table :covid_vaccine_registration_submissions, id: :serial do |t|
t.string "sid", null: false
t.uuid "account_id", null: true
t.string "encrypted_form_data"
t.string "encrypted_form_data_iv"
t.date... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20251208202435_add_default_to_pdf_upload_attempt_count.rb | # frozen_string_literal: true
class AddDefaultToPdfUploadAttemptCount < ActiveRecord::Migration[7.1]
def up
change_column_default :decision_review_notification_audit_logs, :pdf_upload_attempt_count, 0
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20201207173332_add_claim_guid_index_to_form1010cg_submissions.rb | class AddClaimGuidIndexToForm1010cgSubmissions < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
def change
add_index :form1010cg_submissions, :claim_guid, unique: true, algorithm: :concurrently
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240502175753_attempt_may2_add_bdn_clone_line_index_to_user_infos.vye.rb | # This migration comes from vye (originally 20240502000012)
class AttemptMay2AddBdnCloneLineIndexToUserInfos < ActiveRecord::Migration[7.1]
disable_ddl_transaction!
def change
add_index :vye_user_infos, :bdn_clone_line, algorithm: :concurrently
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20231012185517_upgrade_postgis_extension.rb | class UpgradePostgisExtension < ActiveRecord::Migration[6.1]
def up
if Settings.vsp_enviroment == "development"
connection.execute("SELECT postgis_extensions_upgrade();")
connection.execute("SELECT postgis_extensions_upgrade();")
end
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20230106010006_remove_notifications.rb | class RemoveNotifications < ActiveRecord::Migration[6.1]
def up
drop_table :notifications
end
def down
raise ActiveRecord::IrreversibleMigration
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20241108144805_change_claim_va_notification_email_template_id_type.rb | class ChangeClaimVANotificationEmailTemplateIdType < ActiveRecord::Migration[7.1]
def up
safety_assured do
rename_column :claim_va_notifications, :email_template_id, :email_template_id_int
add_column :claim_va_notifications, :email_template_id, :string
vanotify_service = Settings.vanotify.servi... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240410212508_drop_accredited_organizations.rb | # frozen_string_literal: true
class DropAccreditedOrganizations < ActiveRecord::Migration[7.1]
def change
drop_table :accredited_organizations, if_exists: true # rubocop:disable Rails/ReversibleMigration
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20241213173113_add_index_to_banners_path.rb | class AddIndexToBannersPath < ActiveRecord::Migration[7.2]
disable_ddl_transaction!
def change
add_index :banners, :path, algorithm: :concurrently
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240808215701_add_column_metadata_to_saved_claims.rb | class AddColumnMetadataToSavedClaims < ActiveRecord::Migration[7.1]
def change
add_column :saved_claims, :metadata, :text
add_column :saved_claims, :metadata_updated_at, :datetime
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20250304165503_create_ar_power_of_attorney_request_notifications.rb | class CreateArPowerOfAttorneyRequestNotifications < ActiveRecord::Migration[7.2]
def change
create_table :ar_power_of_attorney_request_notifications do |t|
t.references :power_of_attorney_request, type: :uuid, foreign_key: { to_table: :ar_power_of_attorney_requests }, null: false
t.references :notific... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20220906163019_add_middle_initial_to_veteran_representative.rb | class AddMiddleInitialToVeteranRepresentative < ActiveRecord::Migration[6.1]
def change
add_column :veteran_representatives, :middle_initial, :string
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240313235317_drop_credential_adoption_email_record.rb | class DropCredentialAdoptionEmailRecord < ActiveRecord::Migration[7.0]
def up
drop_table :credential_adoption_email_records
end
def down
raise ActiveRecord::IrreversibleMigration
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240213195759_add_column_phone_number_to_veteran_representatives_table.rb | class AddColumnPhoneNumberToVeteranRepresentativesTable < ActiveRecord::Migration[7.0]
def change
add_column :veteran_representatives, :phone_number, :string
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20231113202943_add_address_line_columns_to_veteran_representatives.rb | class AddAddressLineColumnsToVeteranRepresentatives < ActiveRecord::Migration[6.1]
def change
add_column :veteran_representatives, :address_line1, :string
add_column :veteran_representatives, :address_line2, :string
add_column :veteran_representatives, :address_line3, :string
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20221020193309_add_claim_id_errors_to_evidence_waiver_submission.rb | class AddClaimIdErrorsToEvidenceWaiverSubmission < ActiveRecord::Migration[6.1]
def change
add_column :claims_api_evidence_waiver_submissions, :vbms_error_message, :string
add_column :claims_api_evidence_waiver_submissions, :bgs_error_message, :string
add_column :claims_api_evidence_waiver_submissions, :v... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20250210175014_add_bpd_uuid_to_saved_claims.rb | class AddBpdUuidToSavedClaims < ActiveRecord::Migration[7.2]
def change
add_column :saved_claims, :bpd_uuid, :uuid
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240716143105_index_created_at_in_addresses.vye.rb | # This migration comes from vye (originally 20240715000018)
class IndexCreatedAtInAddresses < ActiveRecord::Migration[7.1]
disable_ddl_transaction!
def change
add_index :vye_address_changes, :created_at, algorithm: :concurrently, if_not_exists: true
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20250910170038_add_index_to_record_metadata_needs_kms_rotation.rb | # frozen_string_literal: true
class AddIndexToRecordMetadataNeedsKmsRotation < ActiveRecord::Migration[7.2]
disable_ddl_transaction!
def change
add_index :claims_api_record_metadata, :needs_kms_rotation, algorithm: :concurrently, if_not_exists: true
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240716143102_index_award_in_verifications.vye.rb | # This migration comes from vye (originally 20240715000015)
class IndexAwardInVerifications < ActiveRecord::Migration[7.1]
disable_ddl_transaction!
def change
add_index :vye_verifications, :award_id, algorithm: :concurrently, if_not_exists: true
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20241007180915_add_remediation_type_to_form526_submission_remediations.rb | class AddRemediationTypeToForm526SubmissionRemediations < ActiveRecord::Migration[7.1]
def change
add_column :form526_submission_remediations, :remediation_type, :integer, default: 0
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20251208202433_add_pdf_upload_columns_to_decision_review_notification_audit_logs.rb | # frozen_string_literal: true
class AddPdfUploadColumnsToDecisionReviewNotificationAuditLogs < ActiveRecord::Migration[7.1]
def change
add_column :decision_review_notification_audit_logs, :pdf_uploaded_at, :datetime
add_column :decision_review_notification_audit_logs, :vbms_file_uuid, :string
add_column ... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20230214001703_add_metadata_to_appeals_tables.rb | class AddMetadataToAppealsTables < ActiveRecord::Migration[6.1]
def change
safety_assured do
add_column :appeals_api_higher_level_reviews, :metadata, :jsonb, default: {}
add_column :appeals_api_notice_of_disagreements, :metadata, :jsonb, default: {}
add_column :appeals_api_supplemental_claims, :... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20250916114106_rename_saved_claim_group.rb | # frozen_string_literal: true
# add 's' to the table name so no override in the class is needed
class RenameSavedClaimGroup < ActiveRecord::Migration[7.2]
def change
safety_assured { rename_table :saved_claim_group, :saved_claim_groups }
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240214212613_remove_required_constraint_from_client_config_access_token_audience.rb | class RemoveRequiredConstraintFromClientConfigAccessTokenAudience < ActiveRecord::Migration[7.0]
def change
change_column_null :client_configs, :access_token_audience, true
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240425231641_remove_vye_user_infos.vye.rb | class RemoveVyeUserInfos < ActiveRecord::Migration[7.1]
def change
remove_index "vye_user_infos", column: [:bdn_clone_id], name: "index_vye_user_infos_on_bdn_clone_id", if_exists: true
remove_index "vye_user_infos", column: [:bdn_clone_line], name: "index_vye_user_infos_on_bdn_clone_line", if_exists: true
... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20250402161430_add_encryption_to_ves_data_ivc_champva_forms.rb | class AddEncryptionToVesDataIvcChampvaForms < ActiveRecord::Migration[7.2]
def change
add_column :ivc_champva_forms, :ves_request_data_ciphertext, :text unless column_exists?(:ivc_champva_forms, :ves_request_data_ciphertext)
add_column :ivc_champva_forms, :encrypted_kms_key, :text unless column_exists?(:ivc_c... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20251013162933_remove_accounts_table.rb | class RemoveAccountsTable < ActiveRecord::Migration[7.2]
def change
drop_table :account_login_stats, if_exists: true
drop_table :accounts, if_exists: true
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240520191416_drop_accredited_individuals_accredited_organizations.rb | class DropAccreditedIndividualsAccreditedOrganizations < ActiveRecord::Migration[7.1]
def change
drop_table :accredited_individuals_accredited_organizations, if_exists: true
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20251121181847_add_guid_to_digital_dispute_submissions.rb | # frozen_string_literal: true
class AddGuidToDigitalDisputeSubmissions < ActiveRecord::Migration[7.2]
def change
add_column :digital_dispute_submissions, :guid, :uuid
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20201211213957_add_columns_for_covid_async_submission.rb | class AddColumnsForCovidAsyncSubmission < ActiveRecord::Migration[6.0]
def change
change_column_null :covid_vaccine_registration_submissions, :sid, true
add_column :covid_vaccine_registration_submissions, :encrypted_raw_form_data, :string
add_column :covid_vaccine_registration_submissions, :encrypted_raw... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20250827155102_add_indexes_to_debt_transaction_logs.rb | class AddIndexesToDebtTransactionLogs < ActiveRecord::Migration[7.2]
disable_ddl_transaction!
def change
add_index :debt_transaction_logs, [:user_uuid, :transaction_type], algorithm: :concurrently
add_index :debt_transaction_logs, :debt_identifiers, using: :gin, algorithm: :concurrently
add_index :debt... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20250911092654_create_saved_claim_group.rb | # frozen_string_literal: true
class CreateSavedClaimGroup < ActiveRecord::Migration[7.2]
def change
create_table :saved_claim_group do |t|
t.uuid :claim_group_guid, null: false
t.integer :parent_claim_id, null: false, comment: 'ID of the saved claim in vets-api'
t.integer :saved_claim_id, null:... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20221122003745_add_user_account_to_form5655_submissions.rb | class AddUserAccountToForm5655Submissions < ActiveRecord::Migration[6.1]
def change
safety_assured do
add_reference :form5655_submissions, :user_account, type: :uuid, foreign_key: true, null: true, index: true
end
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20210303164133_add_column_va_form_administration_to_va_forms_forms.rb | class AddColumnVAFormAdministrationToVAFormsForms < ActiveRecord::Migration[6.0]
def change
add_column :va_forms_forms, :va_form_administration, :jsonb
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240122212019_create_flagged_veteran_representative_contact_data.rb | class CreateFlaggedVeteranRepresentativeContactData < ActiveRecord::Migration[7.0]
def change
create_table :flagged_veteran_representative_contact_data do |t|
t.string "ip_address", null: false
t.string "representative_id", null: false
t.string "flag_type", null: false
t.text "flagged_valu... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20251206032553_make_user_account_optional_in_event_bus_gateway_notifications.rb | class MakeUserAccountOptionalInEventBusGatewayNotifications < ActiveRecord::Migration[7.2]
def change
change_column_null :event_bus_gateway_notifications, :user_account_id, true
change_column_null :event_bus_gateway_push_notifications, :user_account_id, true
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20231024161640_add_index_on_name_to_veteran_organizations.rb | class AddIndexOnNameToVeteranOrganizations < ActiveRecord::Migration[6.1]
disable_ddl_transaction!
def change
add_index :veteran_organizations, :name, algorithm: :concurrently
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20210408191850_add_covid_vaccine_expanded_batch_id_index.rb | class AddCovidVaccineExpandedBatchIdIndex < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
def change
add_index :covid_vaccine_expanded_registration_submissions, :batch_id,
algorithm: :concurrently, name: :index_covid_vaccine_expanded_reg_submissions_on_batch_id
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20231113171147_remove_terms_and_conditions.rb | class RemoveTermsAndConditions < ActiveRecord::Migration[6.1]
def up
drop_table :terms_and_conditions
drop_table :terms_and_conditions_acceptances
end
def down
create_table "terms_and_conditions", id: :serial, force: :cascade do |t|
t.string "name"
t.string "title"
t.text "terms_con... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20210331131561_add_index_to_health_quest_questionnaire_responses_encrypted_user_demographics_data_iv.health_quest.rb | class AddIndexToHealthQuestQuestionnaireResponsesEncryptedUserDemographicsDataIv < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
def change
add_index :health_quest_questionnaire_responses, :encrypted_user_demographics_data_iv, unique: true, algorithm: :concurrently, name: 'user_demographics_key'
end
... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20220916043854_delete_and_recreate_mhv_opt_in_flags.rb | class DeleteAndRecreateMHVOptInFlags < ActiveRecord::Migration[6.1]
def up
drop_mhv_opt_in_flags_table
create_mhv_opt_in_flags_table
end
def down
drop_mhv_opt_in_flags_table
create_table :mhv_opt_in_flags do |t|
t.string :user_account_uuid, null: false
t.string :opt_in_flag, null: fal... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20221206191853_drop_preferred_facilities.rb | class DropPreferredFacilities < ActiveRecord::Migration[6.1]
def up
drop_table :preferred_facilities
end
def down
raise ActiveRecord::IrreversibleMigration
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20241112143658_create_form_email_matches_profile_logs.rb | class CreateFormEmailMatchesProfileLogs < ActiveRecord::Migration[7.1]
def change
create_table :form_email_matches_profile_logs do |t|
t.string :user_uuid, null: false
t.integer :in_progress_form_id, null: false
t.timestamps
end
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20201208215916_set_guid_as_uuid_on_form1010cg_submissions.rb | class SetGuidAsUuidOnForm1010cgSubmissions < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
def up
# Column and table are not yet in use. The model is not connected to ActiveRecord.
safety_assured do
remove_column :form1010cg_submissions, :claim_guid
add_column :form1010cg_submissions, :... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20220608131919_add_client_id_oauth_sessions.rb | class AddClientIdOAuthSessions < ActiveRecord::Migration[6.1]
def up
add_column :oauth_sessions, :client_id, :string, null: true
end
def down
remove_column :oauth_sessions, :client_id
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240410212414_remove_fkeys_from_accredited_organizations_accredited_representatives.rb | # frozen_string_literal: true
class RemoveFkeysFromAccreditedOrganizationsAccreditedRepresentatives < ActiveRecord::Migration[7.1]
def change
remove_foreign_key :accredited_organizations_accredited_representatives, :accredited_representatives,
column: :accredited_representative_id, if_exis... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20251216151148_add_index_to_education_benefits_token.rb | # frozen_string_literal: true
class AddIndexToEducationBenefitsToken < ActiveRecord::Migration[7.2]
disable_ddl_transaction!
def change
add_index :education_benefits_claims, :token, algorithm: :concurrently, if_not_exists: true, unique: true
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20251024143311_remove_vso_grp_index_and_add_unique_index.rb | class RemoveVSOGrpIndexAndAddUniqueIndex < ActiveRecord::Migration[7.2]
disable_ddl_transaction!
class Rep < ActiveRecord::Base
self.table_name = 'veteran_representatives'
end
def up
remove_index :veteran_representatives,
name: :index_vso_grp,
if_exists: true,
... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20221019134649_add_status_to_evidence_waiver_submission.rb | class AddStatusToEvidenceWaiverSubmission < ActiveRecord::Migration[6.1]
def change
add_column :claims_api_evidence_waiver_submissions, :status, :string
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20250422190711_add_index_on_needs_kms_rotation_to_encrypted_models.rb | class AddIndexOnNeedsKmsRotationToEncryptedModels < ActiveRecord::Migration[7.2]
disable_ddl_transaction!
def change
tables = ApplicationRecord.descendants_using_encryption.map(&:table_name).uniq
tables.each do |table|
add_index table,
:needs_kms_rotation,
algorithm: ... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240701192934_add_optimized_index_to_vba_documents_upload_submissions.rb | class AddOptimizedIndexToVBADocumentsUploadSubmissions < ActiveRecord::Migration[7.1]
disable_ddl_transaction!
def up
safety_assured do
add_index :vba_documents_upload_submissions,
[:status, :created_at],
name: 'index_vba_docs_upload_submissions_status_created_at',
... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20230531154627_add_refresh_token_path_to_client_config.rb | class AddRefreshTokenPathToClientConfig < ActiveRecord::Migration[6.1]
def change
add_column :client_configs, :refresh_token_path, :string
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240315033525_create_vye_user_profiles.vye.rb | # This migration comes from vye (originally 20240229184515)
class CreateVyeUserProfiles < ActiveRecord::Migration[7.0]
def change
create_table :vye_user_profiles do |t|
t.binary :ssn_digest, limit: 16.bytes
t.binary :file_number_digest, limit: 16.bytes
t.string :icn
t.timestamps
end
... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20210507122840_add_stats_extension.rb | class AddStatsExtension < ActiveRecord::Migration[6.0]
def change
enable_extension 'pg_stat_statements'
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20250507151848_add_needs_kms_rotation_indices_to_submission_tables.rb | class AddNeedsKmsRotationIndicesToSubmissionTables < ActiveRecord::Migration[7.2]
disable_ddl_transaction!
def change
tables = ApplicationRecord.descendants_using_encryption.select do |t|
!t.column_names.include?('needs_kms_rotation')
end.map(&:table_name).uniq
tables.each do |table|
add... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20251006192741_create_bgs_submissions.rb | class CreateBGSSubmissions < ActiveRecord::Migration[7.2]
def change
create_enum :bgs_submission_status, %w[pending submitted failure]
create_table :bgs_submissions do |t|
t.references :saved_claim, null: true, foreign_key: true
t.string :form_id, null: false, comment: 'form type of the submissio... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20241112172605_add_index_to_form_email_matches_profile_logs.rb | class AddIndexToFormEmailMatchesProfileLogs < ActiveRecord::Migration[7.1]
disable_ddl_transaction!
def change
add_index :form_email_matches_profile_logs,
%i[user_uuid in_progress_form_id],
unique: true,
algorithm: :concurrently,
if_not_exists: true
end... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20211119153306_validate_add_not_null_constraint_to_vet_rep_table.rb | class ValidateAddNotNullConstraintToVetRepTable < ActiveRecord::Migration[6.1]
def change
add_check_constraint :veteran_representatives, "representative_id IS NOT NULL", name: "veteran_representatives_representative_id_null", validate: false
end
end |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20210401071242_add_covid_vaccine_expanded_state_index.rb | class AddCovidVaccineExpandedStateIndex < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
def change
add_index :covid_vaccine_expanded_registration_submissions, :state, algorithm: :concurrently
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240306150112_add_default_state_to_form526_submissions.rb | class AddDefaultStateToForm526Submissions < ActiveRecord::Migration[7.0]
def up
change_column_default :form526_submissions, :aasm_state, 'unprocessed'
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20250703183404_add_file_size_to_evidence_submission.rb | class AddFileSizeToEvidenceSubmission < ActiveRecord::Migration[7.2]
def up
add_column :evidence_submissions, :file_size, :integer
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20210315162119_add_email_sent_at_to_education_stem_automated_decision.rb | class AddEmailSentAtToEducationStemAutomatedDecision < ActiveRecord::Migration[6.0]
def change
add_column :education_stem_automated_decisions, :denial_email_sent_at, :timestamp
add_column :education_stem_automated_decisions, :confirmation_email_sent_at, :timestamp
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20201203194817_add_preferred_facilities_indexes.rb | class AddPreferredFacilitiesIndexes < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
def change
add_index :preferred_facilities, [:facility_code, :account_id], unique: true, algorithm: :concurrently
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20231113202956_add_address_line_columns_to_veteran_organizations.rb | class AddAddressLineColumnsToVeteranOrganizations < ActiveRecord::Migration[6.1]
def change
add_column :veteran_organizations, :address_line1, :string
add_column :veteran_organizations, :address_line2, :string
add_column :veteran_organizations, :address_line3, :string
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20200911143406_add_index_to_accounts.rb | # frozen_string_literal: true
class AddIndexToAccounts < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
def change
add_index :accounts, :icn, algorithm: :concurrently
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20250410151321_make_saved_claim_id_nullable_on_submissions.rb | class MakeSavedClaimIdNullableOnSubmissions < ActiveRecord::Migration[7.2]
def up
change_column_null :bpds_submissions, :saved_claim_id, true
BPDS::Submission.where(saved_claim_id: 0).update_all(saved_claim_id: nil)
change_column_null :lighthouse_submissions, :saved_claim_id, true
Lighthouse::Submiss... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240312194623_add_change_history_to_va_forms_forms.rb | class AddChangeHistoryToVAFormsForms < ActiveRecord::Migration[7.0]
def change
add_column :va_forms_forms, :change_history, :jsonb
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20220223000748_create_oauth_sessions.rb | class CreateOAuthSessions < ActiveRecord::Migration[6.1]
def change
create_table :oauth_sessions do |t|
t.uuid :handle, null: false, index: { unique: true }
t.references :user_account, type: :uuid, foreign_key: :true, null: false, index: true
t.string :hashed_refresh_token, null: false, index: {... |
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20211123181757_create_mobile_vaccines.rb | class CreateMobileVaccines < ActiveRecord::Migration[6.1]
def change
create_table :mobile_vaccines do |t|
t.integer :cvx_code, null: false, index: { unique: true }
t.string :group_name, null: false
t.string :manufacturer, null: true
t.timestamps
end
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240410212528_drop_accredited_representatives.rb | # frozen_string_literal: true
class DropAccreditedRepresentatives < ActiveRecord::Migration[7.1]
def change
drop_table :accredited_representatives, if_exists: true # rubocop:disable Rails/ReversibleMigration
end
end
|
0 | code_files/vets-api-private/db | code_files/vets-api-private/db/migrate/20240502175749_attempt_may2_add_is_active_index_to_bdn_clones.vye.rb | # This migration comes from vye (originally 20240502000008)
class AttemptMay2AddIsActiveIndexToBdnClones < ActiveRecord::Migration[7.1]
disable_ddl_transaction!
def change
add_index :vye_bdn_clones, :is_active, algorithm: :concurrently
end
end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.