diff --git a/db/primary_migrate/20241001193936_add_comments_to_all_columns.rb b/db/primary_migrate/20241001193936_add_comments_to_all_columns.rb new file mode 100644 index 00000000000..7d26b3b4fb9 --- /dev/null +++ b/db/primary_migrate/20241001193936_add_comments_to_all_columns.rb @@ -0,0 +1,469 @@ +class AddCommentsToAllColumns < ActiveRecord::Migration[7.1] + def change + ### update known sensitivity flag for table: letter_requests_to_usps_ftp_logs + change_column_comment :letter_requests_to_usps_ftp_logs, :ftp_at, from: "", to: "sensitive=false" + change_column_comment :letter_requests_to_usps_ftp_logs, :letter_requests_count, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: identities + change_column_comment :identities, :service_provider, from: "", to: "sensitive=false" + change_column_comment :identities, :last_authenticated_at, from: "", to: "sensitive=false" + change_column_comment :identities, :user_id, from: "", to: "sensitive=false" + change_column_comment :identities, :created_at, from: "", to: "sensitive=false" + change_column_comment :identities, :updated_at, from: "", to: "sensitive=false" + change_column_comment :identities, :session_uuid, from: "", to: "sensitive=true" + change_column_comment :identities, :uuid, from: "", to: "sensitive=false" + change_column_comment :identities, :nonce, from: "", to: "sensitive=false" + change_column_comment :identities, :ial, from: "", to: "sensitive=false" + change_column_comment :identities, :access_token, from: "", to: "sensitive=true" + change_column_comment :identities, :scope, from: "", to: "sensitive=false" + change_column_comment :identities, :code_challenge, from: "", to: "sensitive=true" + change_column_comment :identities, :rails_session_id, from: "", to: "sensitive=true" + change_column_comment :identities, :verified_attributes, from: "", to: "sensitive=false" + change_column_comment :identities, :verified_at, from: "", to: "sensitive=false" + change_column_comment :identities, :last_consented_at, from: "", to: "sensitive=false" + change_column_comment :identities, :last_ial1_authenticated_at, from: "", to: "sensitive=false" + change_column_comment :identities, :last_ial2_authenticated_at, from: "", to: "sensitive=false" + change_column_comment :identities, :deleted_at, from: "", to: "sensitive=false" + change_column_comment :identities, :aal, from: "", to: "sensitive=false" + change_column_comment :identities, :requested_aal_value, from: "", to: "sensitive=false" + change_column_comment :identities, :vtr, from: "", to: "sensitive=false" + change_column_comment :identities, :acr_values, from: "", to: "sensitive=false" + change_column_comment :identities, :email_address_id, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: profiles + change_column_comment :profiles, :user_id, from: "", to: "sensitive=false" + change_column_comment :profiles, :active, from: "", to: "sensitive=false" + change_column_comment :profiles, :verified_at, from: "", to: "sensitive=false" + change_column_comment :profiles, :activated_at, from: "", to: "sensitive=false" + change_column_comment :profiles, :created_at, from: "", to: "sensitive=false" + change_column_comment :profiles, :updated_at, from: "", to: "sensitive=false" + change_column_comment :profiles, :encrypted_pii, from: "", to: "sensitive=true" + change_column_comment :profiles, :ssn_signature, from: "", to: "sensitive=true" + change_column_comment :profiles, :encrypted_pii_recovery, from: "", to: "sensitive=true" + change_column_comment :profiles, :deactivation_reason, from: "", to: "sensitive=false" + change_column_comment :profiles, :proofing_components, from: "", to: "sensitive=false" + change_column_comment :profiles, :name_zip_birth_year_signature, from: "", to: "sensitive=true" + change_column_comment :profiles, :initiating_service_provider_issuer, from: "", to: "sensitive=false" + change_column_comment :profiles, :fraud_review_pending_at, from: "", to: "sensitive=false" + change_column_comment :profiles, :fraud_rejection_at, from: "", to: "sensitive=false" + change_column_comment :profiles, :gpo_verification_pending_at, from: "", to: "sensitive=false" + change_column_comment :profiles, :fraud_pending_reason, from: "", to: "sensitive=false" + change_column_comment :profiles, :in_person_verification_pending_at, from: "", to: "sensitive=false" + change_column_comment :profiles, :encrypted_pii_multi_region, from: "", to: "sensitive=false" + change_column_comment :profiles, :encrypted_pii_recovery_multi_region, from: "", to: "sensitive=false" + change_column_comment :profiles, :gpo_verification_expired_at, from: "", to: "sensitive=false" + change_column_comment :profiles, :idv_level, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: users + change_column_comment :users, :reset_password_token, from: "", to: "sensitive=true" + change_column_comment :users, :reset_password_sent_at, from: "", to: "sensitive=false" + change_column_comment :users, :created_at, from: "", to: "sensitive=false" + change_column_comment :users, :updated_at, from: "", to: "sensitive=false" + change_column_comment :users, :confirmed_at, from: "", to: "sensitive=false" + change_column_comment :users, :second_factor_attempts_count, from: "", to: "sensitive=false" + change_column_comment :users, :uuid, from: "", to: "sensitive=false" + change_column_comment :users, :second_factor_locked_at, from: "", to: "sensitive=false" + change_column_comment :users, :phone_confirmed_at, from: "", to: "sensitive=false" + change_column_comment :users, :direct_otp, from: "", to: "sensitive=true" + change_column_comment :users, :direct_otp_sent_at, from: "", to: "sensitive=false" + change_column_comment :users, :unique_session_id, from: "", to: "sensitive=false" + change_column_comment :users, :otp_delivery_preference, from: "", to: "sensitive=false" + change_column_comment :users, :encrypted_password_digest, from: "", to: "sensitive=true" + change_column_comment :users, :encrypted_recovery_code_digest, from: "", to: "sensitive=true" + change_column_comment :users, :remember_device_revoked_at, from: "", to: "sensitive=false" + change_column_comment :users, :email_language, from: "", to: "sensitive=false" + change_column_comment :users, :accepted_terms_at, from: "", to: "sensitive=false" + change_column_comment :users, :encrypted_recovery_code_digest_generated_at, from: "", to: "sensitive=false" + change_column_comment :users, :suspended_at, from: "", to: "sensitive=false" + change_column_comment :users, :reinstated_at, from: "", to: "sensitive=false" + change_column_comment :users, :encrypted_password_digest_multi_region, from: "", to: "sensitive=false" + change_column_comment :users, :encrypted_recovery_code_digest_multi_region, from: "", to: "sensitive=false" + change_column_comment :users, :second_mfa_reminder_dismissed_at, from: "", to: "sensitive=false" + change_column_comment :users, :piv_cac_recommended_dismissed_at, from: "", to: "sensitive=false" + change_column_comment :users, :sign_in_new_device_at, from: "", to: "sensitive=false" + change_column_comment :users, :password_compromised_checked_at, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: events + change_column_comment :events, :user_id, from: "", to: "sensitive=false" + change_column_comment :events, :event_type, from: "", to: "sensitive=false" + change_column_comment :events, :created_at, from: "", to: "sensitive=false" + change_column_comment :events, :updated_at, from: "", to: "sensitive=false" + change_column_comment :events, :device_id, from: "", to: "sensitive=false" + change_column_comment :events, :ip, from: "", to: "sensitive=false" + change_column_comment :events, :disavowed_at, from: "", to: "sensitive=false" + change_column_comment :events, :disavowal_token_fingerprint, from: "", to: "sensitive=true" + ### update known sensitivity flag for table: usps_confirmation_codes + change_column_comment :usps_confirmation_codes, :profile_id, from: "", to: "sensitive=false" + change_column_comment :usps_confirmation_codes, :otp_fingerprint, from: "", to: "sensitive=true" + change_column_comment :usps_confirmation_codes, :code_sent_at, from: "", to: "sensitive=false" + change_column_comment :usps_confirmation_codes, :created_at, from: "", to: "sensitive=false" + change_column_comment :usps_confirmation_codes, :updated_at, from: "", to: "sensitive=false" + change_column_comment :usps_confirmation_codes, :reminder_sent_at, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: agency_identities + change_column_comment :agency_identities, :user_id, from: "", to: "sensitive=false" + change_column_comment :agency_identities, :agency_id, from: "", to: "sensitive=false" + change_column_comment :agency_identities, :uuid, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: agencies + change_column_comment :agencies, :name, from: "", to: "sensitive=false" + change_column_comment :agencies, :abbreviation, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: usps_confirmations + change_column_comment :usps_confirmations, :entry, from: "", to: "sensitive=false" + change_column_comment :usps_confirmations, :created_at, from: "", to: "sensitive=false" + change_column_comment :usps_confirmations, :updated_at, from: "", to: "sensitive=false" + change_column_comment :usps_confirmations, :entry_multi_region, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: account_reset_requests + change_column_comment :account_reset_requests, :user_id, from: "", to: "sensitive=false" + change_column_comment :account_reset_requests, :requested_at, from: "", to: "sensitive=false" + change_column_comment :account_reset_requests, :request_token, from: "", to: "sensitive=true" + change_column_comment :account_reset_requests, :cancelled_at, from: "", to: "sensitive=false" + change_column_comment :account_reset_requests, :granted_at, from: "", to: "sensitive=false" + change_column_comment :account_reset_requests, :granted_token, from: "", to: "sensitive=true" + change_column_comment :account_reset_requests, :created_at, from: "", to: "sensitive=false" + change_column_comment :account_reset_requests, :updated_at, from: "", to: "sensitive=false" + change_column_comment :account_reset_requests, :requesting_issuer, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: email_addresses + change_column_comment :email_addresses, :user_id, from: "", to: "sensitive=false" + change_column_comment :email_addresses, :confirmation_token, from: "", to: "sensitive=true" + change_column_comment :email_addresses, :confirmed_at, from: "", to: "sensitive=false" + change_column_comment :email_addresses, :confirmation_sent_at, from: "", to: "sensitive=false" + change_column_comment :email_addresses, :email_fingerprint, from: "", to: "sensitive=false" + change_column_comment :email_addresses, :encrypted_email, from: "", to: "sensitive=true" + change_column_comment :email_addresses, :created_at, from: "", to: "sensitive=false" + change_column_comment :email_addresses, :updated_at, from: "", to: "sensitive=false" + change_column_comment :email_addresses, :last_sign_in_at, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: devices + change_column_comment :devices, :user_id, from: "", to: "sensitive=false" + change_column_comment :devices, :cookie_uuid, from: "", to: "sensitive=false" + change_column_comment :devices, :user_agent, from: "", to: "sensitive=false" + change_column_comment :devices, :last_used_at, from: "", to: "sensitive=false" + change_column_comment :devices, :last_ip, from: "", to: "sensitive=false" + change_column_comment :devices, :created_at, from: "", to: "sensitive=false" + change_column_comment :devices, :updated_at, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: backup_code_configurations + change_column_comment :backup_code_configurations, :user_id, from: "", to: "sensitive=false" + change_column_comment :backup_code_configurations, :used_at, from: "", to: "sensitive=false" + change_column_comment :backup_code_configurations, :created_at, from: "", to: "sensitive=false" + change_column_comment :backup_code_configurations, :updated_at, from: "", to: "sensitive=false" + change_column_comment :backup_code_configurations, :salted_code_fingerprint, from: "", to: "sensitive=false" + change_column_comment :backup_code_configurations, :code_salt, from: "", to: "sensitive=true" + change_column_comment :backup_code_configurations, :code_cost, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: webauthn_configurations + change_column_comment :webauthn_configurations, :user_id, from: "", to: "sensitive=false" + change_column_comment :webauthn_configurations, :name, from: "", to: "sensitive=false" + change_column_comment :webauthn_configurations, :credential_id, from: "", to: "sensitive=false" + change_column_comment :webauthn_configurations, :credential_public_key, from: "", to: "sensitive=false" + change_column_comment :webauthn_configurations, :created_at, from: "", to: "sensitive=false" + change_column_comment :webauthn_configurations, :updated_at, from: "", to: "sensitive=false" + change_column_comment :webauthn_configurations, :platform_authenticator, from: "", to: "sensitive=false" + change_column_comment :webauthn_configurations, :transports, from: "", to: "sensitive=false" + change_column_comment :webauthn_configurations, :authenticator_data_flags, from: "", to: "sensitive=false" + change_column_comment :webauthn_configurations, :aaguid, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: phone_configurations + change_column_comment :phone_configurations, :user_id, from: "", to: "sensitive=false" + change_column_comment :phone_configurations, :encrypted_phone, from: "", to: "sensitive=false" + change_column_comment :phone_configurations, :delivery_preference, from: "", to: "sensitive=false" + change_column_comment :phone_configurations, :mfa_enabled, from: "", to: "sensitive=false" + change_column_comment :phone_configurations, :confirmation_sent_at, from: "", to: "sensitive=false" + change_column_comment :phone_configurations, :confirmed_at, from: "", to: "sensitive=false" + change_column_comment :phone_configurations, :created_at, from: "", to: "sensitive=false" + change_column_comment :phone_configurations, :updated_at, from: "", to: "sensitive=false" + change_column_comment :phone_configurations, :made_default_at, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: registration_logs + change_column_comment :registration_logs, :user_id, from: "", to: "sensitive=false" + change_column_comment :registration_logs, :registered_at, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: sp_return_logs + change_column_comment :sp_return_logs, :requested_at, from: "", to: "sensitive=false" + change_column_comment :sp_return_logs, :request_id, from: "", to: "sensitive=false" + change_column_comment :sp_return_logs, :ial, from: "", to: "sensitive=false" + change_column_comment :sp_return_logs, :issuer, from: "", to: "sensitive=false" + change_column_comment :sp_return_logs, :user_id, from: "", to: "sensitive=false" + change_column_comment :sp_return_logs, :returned_at, from: "", to: "sensitive=false" + change_column_comment :sp_return_logs, :billable, from: "", to: "sensitive=false" + change_column_comment :sp_return_logs, :profile_id, from: "", to: "sensitive=false" + change_column_comment :sp_return_logs, :profile_verified_at, from: "", to: "sensitive=false" + change_column_comment :sp_return_logs, :profile_requested_issuer, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: piv_cac_configurations + change_column_comment :piv_cac_configurations, :user_id, from: "", to: "sensitive=false" + change_column_comment :piv_cac_configurations, :x509_dn_uuid, from: "", to: "sensitive=false" + change_column_comment :piv_cac_configurations, :name, from: "", to: "sensitive=false" + change_column_comment :piv_cac_configurations, :created_at, from: "", to: "sensitive=false" + change_column_comment :piv_cac_configurations, :updated_at, from: "", to: "sensitive=false" + change_column_comment :piv_cac_configurations, :x509_issuer, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: auth_app_configurations + change_column_comment :auth_app_configurations, :user_id, from: "", to: "sensitive=false" + change_column_comment :auth_app_configurations, :encrypted_otp_secret_key, from: "", to: "sensitive=true" + change_column_comment :auth_app_configurations, :name, from: "", to: "sensitive=false" + change_column_comment :auth_app_configurations, :totp_timestamp, from: "", to: "sensitive=false" + change_column_comment :auth_app_configurations, :created_at, from: "", to: "sensitive=false" + change_column_comment :auth_app_configurations, :updated_at, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: deleted_users + change_column_comment :deleted_users, :user_id, from: "", to: "sensitive=false" + change_column_comment :deleted_users, :uuid, from: "", to: "sensitive=false" + change_column_comment :deleted_users, :user_created_at, from: "", to: "sensitive=false" + change_column_comment :deleted_users, :deleted_at, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: service_providers + change_column_comment :service_providers, :issuer, from: "", to: "sensitive=false" + change_column_comment :service_providers, :friendly_name, from: "", to: "sensitive=false" + change_column_comment :service_providers, :description, from: "", to: "sensitive=false" + change_column_comment :service_providers, :metadata_url, from: "", to: "sensitive=false" + change_column_comment :service_providers, :acs_url, from: "", to: "sensitive=false" + change_column_comment :service_providers, :assertion_consumer_logout_service_url, from: "", to: "sensitive=false" + change_column_comment :service_providers, :logo, from: "", to: "sensitive=false" + change_column_comment :service_providers, :signature, from: "", to: "sensitive=false" + change_column_comment :service_providers, :block_encryption, from: "", to: "sensitive=true" + change_column_comment :service_providers, :sp_initiated_login_url, from: "", to: "sensitive=false" + change_column_comment :service_providers, :return_to_sp_url, from: "", to: "sensitive=false" + change_column_comment :service_providers, :attribute_bundle, from: "", to: "sensitive=false" + change_column_comment :service_providers, :created_at, from: "", to: "sensitive=false" + change_column_comment :service_providers, :updated_at, from: "", to: "sensitive=false" + change_column_comment :service_providers, :active, from: "", to: "sensitive=false" + change_column_comment :service_providers, :approved, from: "", to: "sensitive=false" + change_column_comment :service_providers, :native, from: "", to: "sensitive=false" + change_column_comment :service_providers, :redirect_uris, from: "", to: "sensitive=false" + change_column_comment :service_providers, :agency_id, from: "", to: "sensitive=false" + change_column_comment :service_providers, :failure_to_proof_url, from: "", to: "sensitive=false" + change_column_comment :service_providers, :ial, from: "", to: "sensitive=false" + change_column_comment :service_providers, :piv_cac, from: "", to: "sensitive=false" + change_column_comment :service_providers, :piv_cac_scoped_by_email, from: "", to: "sensitive=false" + change_column_comment :service_providers, :pkce, from: "", to: "sensitive=false" + change_column_comment :service_providers, :push_notification_url, from: "", to: "sensitive=false" + change_column_comment :service_providers, :help_text, from: "", to: "sensitive=false" + change_column_comment :service_providers, :allow_prompt_login, from: "", to: "sensitive=false" + change_column_comment :service_providers, :signed_response_message_requested, from: "", to: "sensitive=false" + change_column_comment :service_providers, :remote_logo_key, from: "", to: "sensitive=false" + change_column_comment :service_providers, :launch_date, from: "", to: "sensitive=false" + change_column_comment :service_providers, :iaa, from: "", to: "sensitive=false" + change_column_comment :service_providers, :iaa_start_date, from: "", to: "sensitive=false" + change_column_comment :service_providers, :iaa_end_date, from: "", to: "sensitive=false" + change_column_comment :service_providers, :app_id, from: "", to: "sensitive=false" + change_column_comment :service_providers, :default_aal, from: "", to: "sensitive=false" + change_column_comment :service_providers, :certs, from: "", to: "sensitive=false" + change_column_comment :service_providers, :email_nameid_format_allowed, from: "", to: "sensitive=false" + change_column_comment :service_providers, :use_legacy_name_id_behavior, from: "", to: "sensitive=false" + change_column_comment :service_providers, :irs_attempts_api_enabled, from: "", to: "sensitive=false" + change_column_comment :service_providers, :in_person_proofing_enabled, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: security_events + change_column_comment :security_events, :user_id, from: "", to: "sensitive=false" + change_column_comment :security_events, :event_type, from: "", to: "sensitive=false" + change_column_comment :security_events, :jti, from: "", to: "sensitive=false" + change_column_comment :security_events, :issuer, from: "", to: "sensitive=false" + change_column_comment :security_events, :created_at, from: "", to: "sensitive=false" + change_column_comment :security_events, :updated_at, from: "", to: "sensitive=false" + change_column_comment :security_events, :occurred_at, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: sp_costs + change_column_comment :sp_costs, :issuer, from: "", to: "sensitive=false" + change_column_comment :sp_costs, :agency_id, from: "", to: "sensitive=false" + change_column_comment :sp_costs, :cost_type, from: "", to: "sensitive=false" + change_column_comment :sp_costs, :created_at, from: "", to: "sensitive=false" + change_column_comment :sp_costs, :updated_at, from: "", to: "sensitive=false" + change_column_comment :sp_costs, :ial, from: "", to: "sensitive=false" + change_column_comment :sp_costs, :transaction_id, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: partner_accounts + change_column_comment :partner_accounts, :name, from: "", to: "sensitive=false" + change_column_comment :partner_accounts, :description, from: "", to: "sensitive=false" + change_column_comment :partner_accounts, :requesting_agency, from: "", to: "sensitive=false" + change_column_comment :partner_accounts, :became_partner, from: "", to: "sensitive=false" + change_column_comment :partner_accounts, :agency_id, from: "", to: "sensitive=false" + change_column_comment :partner_accounts, :partner_account_status_id, from: "", to: "sensitive=false" + change_column_comment :partner_accounts, :crm_id, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: partner_account_statuses + change_column_comment :partner_account_statuses, :name, from: "", to: "sensitive=false" + change_column_comment :partner_account_statuses, :order, from: "", to: "sensitive=false" + change_column_comment :partner_account_statuses, :partner_name, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: doc_auth_logs + change_column_comment :doc_auth_logs, :user_id, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :welcome_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :welcome_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :upload_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :upload_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :link_sent_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :link_sent_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :front_image_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :front_image_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :front_image_submit_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :front_image_error_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :back_image_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :back_image_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :back_image_submit_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :back_image_error_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :mobile_front_image_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :mobile_front_image_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :mobile_back_image_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :mobile_back_image_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :ssn_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :ssn_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :verify_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :verify_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :verify_submit_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :verify_error_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :verify_phone_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :verify_phone_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :usps_address_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :usps_address_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :encrypt_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :encrypt_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :verified_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :verified_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :created_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :updated_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :mobile_front_image_submit_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :mobile_front_image_error_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :mobile_back_image_submit_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :mobile_back_image_error_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :usps_letter_sent_submit_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :usps_letter_sent_error_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :capture_mobile_back_image_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :capture_mobile_back_image_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :capture_complete_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :capture_complete_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :capture_mobile_back_image_submit_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :capture_mobile_back_image_error_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :no_sp_session_started_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :choose_method_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :choose_method_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :present_cac_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :present_cac_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :present_cac_submit_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :present_cac_error_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :enter_info_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :enter_info_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :success_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :success_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :selfie_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :selfie_submit_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :selfie_error_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :issuer, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :last_document_error, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :document_capture_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :document_capture_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :document_capture_submit_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :document_capture_error_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :agreement_view_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :agreement_view_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :state, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :verify_submit_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :verify_phone_submit_count, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :verify_phone_submit_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :document_capture_submit_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :back_image_submit_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :capture_mobile_back_image_submit_at, from: "", to: "sensitive=false" + change_column_comment :doc_auth_logs, :mobile_back_image_submit_at, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: document_capture_sessions + change_column_comment :document_capture_sessions, :uuid, from: "", to: "sensitive=false" + change_column_comment :document_capture_sessions, :result_id, from: "", to: "sensitive=false" + change_column_comment :document_capture_sessions, :user_id, from: "", to: "sensitive=false" + change_column_comment :document_capture_sessions, :created_at, from: "", to: "sensitive=false" + change_column_comment :document_capture_sessions, :updated_at, from: "", to: "sensitive=false" + change_column_comment :document_capture_sessions, :requested_at, from: "", to: "sensitive=false" + change_column_comment :document_capture_sessions, :issuer, from: "", to: "sensitive=false" + change_column_comment :document_capture_sessions, :cancelled_at, from: "", to: "sensitive=false" + change_column_comment :document_capture_sessions, :ocr_confirmation_pending, from: "", to: "sensitive=false" + change_column_comment :document_capture_sessions, :last_doc_auth_result, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: integrations + change_column_comment :integrations, :issuer, from: "", to: "sensitive=false" + change_column_comment :integrations, :name, from: "", to: "sensitive=false" + change_column_comment :integrations, :dashboard_identifier, from: "", to: "sensitive=false" + change_column_comment :integrations, :partner_account_id, from: "", to: "sensitive=false" + change_column_comment :integrations, :integration_status_id, from: "", to: "sensitive=false" + change_column_comment :integrations, :service_provider_id, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: integration_statuses + change_column_comment :integration_statuses, :name, from: "", to: "sensitive=false" + change_column_comment :integration_statuses, :order, from: "", to: "sensitive=false" + change_column_comment :integration_statuses, :partner_name, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: integration_usages + change_column_comment :integration_usages, :iaa_order_id, from: "", to: "sensitive=false" + change_column_comment :integration_usages, :integration_id, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: iaa_gtcs + change_column_comment :iaa_gtcs, :gtc_number, from: "", to: "sensitive=false" + change_column_comment :iaa_gtcs, :mod_number, from: "", to: "sensitive=false" + change_column_comment :iaa_gtcs, :start_date, from: "", to: "sensitive=false" + change_column_comment :iaa_gtcs, :end_date, from: "", to: "sensitive=false" + change_column_comment :iaa_gtcs, :estimated_amount, from: "", to: "sensitive=false" + change_column_comment :iaa_gtcs, :partner_account_id, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: iaa_orders + change_column_comment :iaa_orders, :order_number, from: "", to: "sensitive=false" + change_column_comment :iaa_orders, :mod_number, from: "", to: "sensitive=false" + change_column_comment :iaa_orders, :start_date, from: "", to: "sensitive=false" + change_column_comment :iaa_orders, :end_date, from: "", to: "sensitive=false" + change_column_comment :iaa_orders, :estimated_amount, from: "", to: "sensitive=false" + change_column_comment :iaa_orders, :pricing_model, from: "", to: "sensitive=false" + change_column_comment :iaa_orders, :iaa_gtc_id, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: sign_in_restrictions + change_column_comment :sign_in_restrictions, :user_id, from: "", to: "sensitive=false" + change_column_comment :sign_in_restrictions, :service_provider, from: "", to: "sensitive=false" + change_column_comment :sign_in_restrictions, :created_at, from: "", to: "sensitive=false" + change_column_comment :sign_in_restrictions, :updated_at, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: phone_number_opt_outs + change_column_comment :phone_number_opt_outs, :encrypted_phone, from: "", to: "sensitive=false" + change_column_comment :phone_number_opt_outs, :phone_fingerprint, from: "", to: "sensitive=false" + change_column_comment :phone_number_opt_outs, :uuid, from: "", to: "sensitive=false" + change_column_comment :phone_number_opt_outs, :created_at, from: "", to: "sensitive=false" + change_column_comment :phone_number_opt_outs, :updated_at, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: proofing_components + change_column_comment :proofing_components, :user_id, from: "", to: "sensitive=false" + change_column_comment :proofing_components, :document_check, from: "", to: "sensitive=false" + change_column_comment :proofing_components, :document_type, from: "", to: "sensitive=false" + change_column_comment :proofing_components, :source_check, from: "", to: "sensitive=false" + change_column_comment :proofing_components, :resolution_check, from: "", to: "sensitive=false" + change_column_comment :proofing_components, :address_check, from: "", to: "sensitive=false" + change_column_comment :proofing_components, :verified_at, from: "", to: "sensitive=false" + change_column_comment :proofing_components, :created_at, from: "", to: "sensitive=false" + change_column_comment :proofing_components, :updated_at, from: "", to: "sensitive=false" + change_column_comment :proofing_components, :liveness_check, from: "", to: "sensitive=false" + change_column_comment :proofing_components, :device_fingerprinting_vendor, from: "", to: "sensitive=false" + change_column_comment :proofing_components, :threatmetrix, from: "", to: "sensitive=false" + change_column_comment :proofing_components, :threatmetrix_review_status, from: "", to: "sensitive=false" + change_column_comment :proofing_components, :threatmetrix_risk_rating, from: "", to: "sensitive=false" + change_column_comment :proofing_components, :threatmetrix_policy_score, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: fraud_review_requests + change_column_comment :fraud_review_requests, :user_id, from: "", to: "sensitive=false" + change_column_comment :fraud_review_requests, :uuid, from: "", to: "sensitive=false" + change_column_comment :fraud_review_requests, :irs_session_id, from: "", to: "sensitive=false" + change_column_comment :fraud_review_requests, :login_session_id, from: "", to: "sensitive=false" + change_column_comment :fraud_review_requests, :created_at, from: "", to: "sensitive=false" + change_column_comment :fraud_review_requests, :updated_at, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: in_person_enrollments + change_column_comment :in_person_enrollments, :user_id, from: "Foreign key to the user this enrollment belongs to", to: "Foreign key to the user this enrollment belongs to sensitive=false" + change_column_comment :in_person_enrollments, :profile_id, from: "Foreign key to the profile this enrollment belongs to", to: "Foreign key to the profile this enrollment belongs to sensitive=false" + change_column_comment :in_person_enrollments, :enrollment_code, from: "The code returned by the USPS service", to: "The code returned by the USPS service sensitive=false" + change_column_comment :in_person_enrollments, :status_check_attempted_at, from: "The last time a status check was attempted", to: "The last time a status check was attempted sensitive=false" + change_column_comment :in_person_enrollments, :status_updated_at, from: "The last time the status was successfully updated with a value from the USPS API", to: "The last time the status was successfully updated with a value from the USPS API sensitive=false" + change_column_comment :in_person_enrollments, :status, from: "The status of the enrollment", to: "The status of the enrollment sensitive=false" + change_column_comment :in_person_enrollments, :created_at, from: "", to: "sensitive=false" + change_column_comment :in_person_enrollments, :updated_at, from: "", to: "sensitive=false" + change_column_comment :in_person_enrollments, :current_address_matches_id, from: "True if the user indicates that their current address matches the address on the ID they're bringing to the Post Office.", to: "True if the user indicates that their current address matches the address on the ID they're bringing to the Post Office. sensitive=false" + change_column_comment :in_person_enrollments, :selected_location_details, from: "The location details of the Post Office the user selected (including title, address, hours of operation)", to: "The location details of the Post Office the user selected (including title, address, hours of operation) sensitive=false" + change_column_comment :in_person_enrollments, :unique_id, from: "Unique ID to use with the USPS service", to: "Unique ID to use with the USPS service sensitive=false" + change_column_comment :in_person_enrollments, :enrollment_established_at, from: "When the enrollment was successfully established", to: "When the enrollment was successfully established sensitive=false" + change_column_comment :in_person_enrollments, :issuer, from: "Issuer associated with the enrollment at time of creation", to: "Issuer associated with the enrollment at time of creation sensitive=false" + change_column_comment :in_person_enrollments, :follow_up_survey_sent, from: "", to: "sensitive=false" + change_column_comment :in_person_enrollments, :early_reminder_sent, from: "early reminder to complete IPP before deadline sent", to: "early reminder to complete IPP before deadline sent sensitive=false" + change_column_comment :in_person_enrollments, :late_reminder_sent, from: "late reminder to complete IPP before deadline sent", to: "late reminder to complete IPP before deadline sent sensitive=false" + change_column_comment :in_person_enrollments, :deadline_passed_sent, from: "deadline passed email sent for expired enrollment", to: "deadline passed email sent for expired enrollment sensitive=false" + change_column_comment :in_person_enrollments, :proofed_at, from: "timestamp when user attempted to proof at a Post Office", to: "timestamp when user attempted to proof at a Post Office sensitive=false" + change_column_comment :in_person_enrollments, :capture_secondary_id_enabled, from: "record and proof state ID and residential addresses separately", to: "record and proof state ID and residential addresses separately sensitive=false" + change_column_comment :in_person_enrollments, :status_check_completed_at, from: "The last time a status check was successfully completed", to: "The last time a status check was successfully completed sensitive=false" + change_column_comment :in_person_enrollments, :ready_for_status_check, from: "", to: "sensitive=false" + change_column_comment :in_person_enrollments, :notification_sent_at, from: "The time a notification was sent", to: "The time a notification was sent sensitive=false" + change_column_comment :in_person_enrollments, :last_batch_claimed_at, from: "", to: "sensitive=false" + change_column_comment :in_person_enrollments, :sponsor_id, from: "", to: "sensitive=false" + change_column_comment :in_person_enrollments, :doc_auth_result, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: notification_phone_configurations + change_column_comment :notification_phone_configurations, :in_person_enrollment_id, from: "", to: "sensitive=false" + change_column_comment :notification_phone_configurations, :encrypted_phone, from: "Encrypted phone number to send notifications to", to: "Encrypted phone number to send notifications to sensitive=true" + change_column_comment :notification_phone_configurations, :created_at, from: "", to: "sensitive=false" + change_column_comment :notification_phone_configurations, :updated_at, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: suspended_emails + change_column_comment :suspended_emails, :email_address_id, from: "", to: "sensitive=false" + change_column_comment :suspended_emails, :digested_base_email, from: "", to: "sensitive=false" + change_column_comment :suspended_emails, :created_at, from: "", to: "sensitive=false" + change_column_comment :suspended_emails, :updated_at, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: federal_email_domains + change_column_comment :federal_email_domains, :name, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: disposable_email_domains + change_column_comment :disposable_email_domains, :name, from: "", to: "sensitive=false" + ### update known sensitivity flag for table: sp_upgraded_biometric_profiles + change_column_comment :sp_upgraded_biometric_profiles, :upgraded_at, from: "", to: "sensitive=false" + change_column_comment :sp_upgraded_biometric_profiles, :user_id, from: "", to: "sensitive=false" + change_column_comment :sp_upgraded_biometric_profiles, :idv_level, from: "", to: "sensitive=false" + change_column_comment :sp_upgraded_biometric_profiles, :issuer, from: "", to: "sensitive=false" + change_column_comment :sp_upgraded_biometric_profiles, :created_at, from: "", to: "sensitive=false" + change_column_comment :sp_upgraded_biometric_profiles, :updated_at, from: "", to: "sensitive=false" + end +end diff --git a/db/schema.rb b/db/schema.rb index cd2309f566f..bd6c67d0f62 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,22 +10,22 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_09_16_202940) do +ActiveRecord::Schema[7.1].define(version: 2024_10_01_193936) do # These are extensions that must be enabled in order to support this database enable_extension "citext" enable_extension "pg_stat_statements" enable_extension "plpgsql" create_table "account_reset_requests", force: :cascade do |t| - t.integer "user_id", null: false - t.datetime "requested_at", precision: nil - t.string "request_token" - t.datetime "cancelled_at", precision: nil - t.datetime "granted_at", precision: nil - t.string "granted_token" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.string "requesting_issuer" + t.integer "user_id", null: false, comment: "sensitive=false" + t.datetime "requested_at", precision: nil, comment: "sensitive=false" + t.string "request_token", comment: "sensitive=true" + t.datetime "cancelled_at", precision: nil, comment: "sensitive=false" + t.datetime "granted_at", precision: nil, comment: "sensitive=false" + t.string "granted_token", comment: "sensitive=true" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" + t.string "requesting_issuer", comment: "sensitive=false" t.index ["cancelled_at", "granted_at", "requested_at"], name: "index_account_reset_requests_on_timestamps" t.index ["granted_token"], name: "index_account_reset_requests_on_granted_token", unique: true t.index ["request_token"], name: "index_account_reset_requests_on_request_token", unique: true @@ -33,179 +33,179 @@ end create_table "agencies", force: :cascade do |t| - t.string "name", null: false - t.string "abbreviation" + t.string "name", null: false, comment: "sensitive=false" + t.string "abbreviation", comment: "sensitive=false" t.index ["abbreviation"], name: "index_agencies_on_abbreviation", unique: true t.index ["name"], name: "index_agencies_on_name", unique: true t.check_constraint "abbreviation IS NOT NULL", name: "agencies_abbreviation_null" end create_table "agency_identities", force: :cascade do |t| - t.integer "user_id", null: false - t.integer "agency_id", null: false - t.string "uuid", null: false + t.integer "user_id", null: false, comment: "sensitive=false" + t.integer "agency_id", null: false, comment: "sensitive=false" + t.string "uuid", null: false, comment: "sensitive=false" t.index ["user_id", "agency_id"], name: "index_agency_identities_on_user_id_and_agency_id", unique: true t.index ["uuid"], name: "index_agency_identities_on_uuid", unique: true end create_table "auth_app_configurations", force: :cascade do |t| - t.integer "user_id", null: false - t.string "encrypted_otp_secret_key", null: false - t.string "name", null: false - t.integer "totp_timestamp" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false + t.integer "user_id", null: false, comment: "sensitive=false" + t.string "encrypted_otp_secret_key", null: false, comment: "sensitive=true" + t.string "name", null: false, comment: "sensitive=false" + t.integer "totp_timestamp", comment: "sensitive=false" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" t.index ["user_id", "created_at"], name: "index_auth_app_configurations_on_user_id_and_created_at", unique: true t.index ["user_id", "name"], name: "index_auth_app_configurations_on_user_id_and_name", unique: true end create_table "backup_code_configurations", force: :cascade do |t| - t.integer "user_id", null: false - t.datetime "used_at", precision: nil - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.string "salted_code_fingerprint" - t.string "code_salt" - t.string "code_cost" + t.integer "user_id", null: false, comment: "sensitive=false" + t.datetime "used_at", precision: nil, comment: "sensitive=false" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" + t.string "salted_code_fingerprint", comment: "sensitive=false" + t.string "code_salt", comment: "sensitive=true" + t.string "code_cost", comment: "sensitive=false" t.index ["user_id", "created_at"], name: "index_backup_code_configurations_on_user_id_and_created_at" t.index ["user_id", "salted_code_fingerprint"], name: "index_backup_codes_on_user_id_and_salted_code_fingerprint" end create_table "deleted_users", force: :cascade do |t| - t.integer "user_id", null: false - t.string "uuid", null: false - t.datetime "user_created_at", precision: nil, null: false - t.datetime "deleted_at", precision: nil, null: false + t.integer "user_id", null: false, comment: "sensitive=false" + t.string "uuid", null: false, comment: "sensitive=false" + t.datetime "user_created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "deleted_at", precision: nil, null: false, comment: "sensitive=false" t.index ["user_id"], name: "index_deleted_users_on_user_id", unique: true t.index ["uuid"], name: "index_deleted_users_on_uuid", unique: true end create_table "devices", force: :cascade do |t| - t.integer "user_id", null: false - t.string "cookie_uuid", null: false - t.string "user_agent", null: false - t.datetime "last_used_at", precision: nil, null: false - t.string "last_ip", limit: 255, null: false - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false + t.integer "user_id", null: false, comment: "sensitive=false" + t.string "cookie_uuid", null: false, comment: "sensitive=false" + t.string "user_agent", null: false, comment: "sensitive=false" + t.datetime "last_used_at", precision: nil, null: false, comment: "sensitive=false" + t.string "last_ip", limit: 255, null: false, comment: "sensitive=false" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" t.index ["cookie_uuid"], name: "index_devices_on_cookie_uuid" t.index ["user_id", "last_used_at"], name: "index_device_user_id_last_used_at" end create_table "disposable_email_domains", force: :cascade do |t| - t.citext "name", null: false + t.citext "name", null: false, comment: "sensitive=false" t.index ["name"], name: "index_disposable_email_domains_on_name", unique: true end create_table "doc_auth_logs", force: :cascade do |t| - t.integer "user_id", null: false - t.datetime "welcome_view_at", precision: nil - t.integer "welcome_view_count", default: 0 - t.datetime "upload_view_at", precision: nil - t.integer "upload_view_count", default: 0 - t.datetime "link_sent_view_at", precision: nil - t.integer "link_sent_view_count", default: 0 - t.datetime "front_image_view_at", precision: nil - t.integer "front_image_view_count", default: 0 - t.integer "front_image_submit_count", default: 0 - t.integer "front_image_error_count", default: 0 - t.datetime "back_image_view_at", precision: nil - t.integer "back_image_view_count", default: 0 - t.integer "back_image_submit_count", default: 0 - t.integer "back_image_error_count", default: 0 - t.datetime "mobile_front_image_view_at", precision: nil - t.integer "mobile_front_image_view_count", default: 0 - t.datetime "mobile_back_image_view_at", precision: nil - t.integer "mobile_back_image_view_count", default: 0 - t.datetime "ssn_view_at", precision: nil - t.integer "ssn_view_count", default: 0 - t.datetime "verify_view_at", precision: nil - t.integer "verify_view_count", default: 0 - t.integer "verify_submit_count", default: 0 - t.integer "verify_error_count", default: 0 - t.datetime "verify_phone_view_at", precision: nil - t.integer "verify_phone_view_count", default: 0 - t.datetime "usps_address_view_at", precision: nil - t.integer "usps_address_view_count", default: 0 - t.datetime "encrypt_view_at", precision: nil - t.integer "encrypt_view_count", default: 0 - t.datetime "verified_view_at", precision: nil - t.integer "verified_view_count", default: 0 - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.integer "mobile_front_image_submit_count", default: 0 - t.integer "mobile_front_image_error_count", default: 0 - t.integer "mobile_back_image_submit_count", default: 0 - t.integer "mobile_back_image_error_count", default: 0 - t.integer "usps_letter_sent_submit_count", default: 0 - t.integer "usps_letter_sent_error_count", default: 0 - t.datetime "capture_mobile_back_image_view_at", precision: nil - t.integer "capture_mobile_back_image_view_count", default: 0 - t.datetime "capture_complete_view_at", precision: nil - t.integer "capture_complete_view_count", default: 0 - t.integer "capture_mobile_back_image_submit_count", default: 0 - t.integer "capture_mobile_back_image_error_count", default: 0 - t.datetime "no_sp_session_started_at", precision: nil - t.datetime "choose_method_view_at", precision: nil - t.integer "choose_method_view_count", default: 0 - t.datetime "present_cac_view_at", precision: nil - t.integer "present_cac_view_count", default: 0 - t.integer "present_cac_submit_count", default: 0 - t.integer "present_cac_error_count", default: 0 - t.datetime "enter_info_view_at", precision: nil - t.integer "enter_info_view_count", default: 0 - t.datetime "success_view_at", precision: nil - t.integer "success_view_count", default: 0 - t.integer "selfie_view_count", default: 0 - t.integer "selfie_submit_count", default: 0 - t.integer "selfie_error_count", default: 0 - t.string "issuer" - t.string "last_document_error" - t.datetime "document_capture_view_at", precision: nil - t.integer "document_capture_view_count", default: 0 - t.integer "document_capture_submit_count", default: 0 - t.integer "document_capture_error_count", default: 0 - t.datetime "agreement_view_at", precision: nil - t.integer "agreement_view_count", default: 0 - t.string "state" - t.datetime "verify_submit_at", precision: nil - t.integer "verify_phone_submit_count", default: 0 - t.datetime "verify_phone_submit_at", precision: nil - t.datetime "document_capture_submit_at", precision: nil - t.datetime "back_image_submit_at", precision: nil - t.datetime "capture_mobile_back_image_submit_at", precision: nil - t.datetime "mobile_back_image_submit_at", precision: nil + t.integer "user_id", null: false, comment: "sensitive=false" + t.datetime "welcome_view_at", precision: nil, comment: "sensitive=false" + t.integer "welcome_view_count", default: 0, comment: "sensitive=false" + t.datetime "upload_view_at", precision: nil, comment: "sensitive=false" + t.integer "upload_view_count", default: 0, comment: "sensitive=false" + t.datetime "link_sent_view_at", precision: nil, comment: "sensitive=false" + t.integer "link_sent_view_count", default: 0, comment: "sensitive=false" + t.datetime "front_image_view_at", precision: nil, comment: "sensitive=false" + t.integer "front_image_view_count", default: 0, comment: "sensitive=false" + t.integer "front_image_submit_count", default: 0, comment: "sensitive=false" + t.integer "front_image_error_count", default: 0, comment: "sensitive=false" + t.datetime "back_image_view_at", precision: nil, comment: "sensitive=false" + t.integer "back_image_view_count", default: 0, comment: "sensitive=false" + t.integer "back_image_submit_count", default: 0, comment: "sensitive=false" + t.integer "back_image_error_count", default: 0, comment: "sensitive=false" + t.datetime "mobile_front_image_view_at", precision: nil, comment: "sensitive=false" + t.integer "mobile_front_image_view_count", default: 0, comment: "sensitive=false" + t.datetime "mobile_back_image_view_at", precision: nil, comment: "sensitive=false" + t.integer "mobile_back_image_view_count", default: 0, comment: "sensitive=false" + t.datetime "ssn_view_at", precision: nil, comment: "sensitive=false" + t.integer "ssn_view_count", default: 0, comment: "sensitive=false" + t.datetime "verify_view_at", precision: nil, comment: "sensitive=false" + t.integer "verify_view_count", default: 0, comment: "sensitive=false" + t.integer "verify_submit_count", default: 0, comment: "sensitive=false" + t.integer "verify_error_count", default: 0, comment: "sensitive=false" + t.datetime "verify_phone_view_at", precision: nil, comment: "sensitive=false" + t.integer "verify_phone_view_count", default: 0, comment: "sensitive=false" + t.datetime "usps_address_view_at", precision: nil, comment: "sensitive=false" + t.integer "usps_address_view_count", default: 0, comment: "sensitive=false" + t.datetime "encrypt_view_at", precision: nil, comment: "sensitive=false" + t.integer "encrypt_view_count", default: 0, comment: "sensitive=false" + t.datetime "verified_view_at", precision: nil, comment: "sensitive=false" + t.integer "verified_view_count", default: 0, comment: "sensitive=false" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" + t.integer "mobile_front_image_submit_count", default: 0, comment: "sensitive=false" + t.integer "mobile_front_image_error_count", default: 0, comment: "sensitive=false" + t.integer "mobile_back_image_submit_count", default: 0, comment: "sensitive=false" + t.integer "mobile_back_image_error_count", default: 0, comment: "sensitive=false" + t.integer "usps_letter_sent_submit_count", default: 0, comment: "sensitive=false" + t.integer "usps_letter_sent_error_count", default: 0, comment: "sensitive=false" + t.datetime "capture_mobile_back_image_view_at", precision: nil, comment: "sensitive=false" + t.integer "capture_mobile_back_image_view_count", default: 0, comment: "sensitive=false" + t.datetime "capture_complete_view_at", precision: nil, comment: "sensitive=false" + t.integer "capture_complete_view_count", default: 0, comment: "sensitive=false" + t.integer "capture_mobile_back_image_submit_count", default: 0, comment: "sensitive=false" + t.integer "capture_mobile_back_image_error_count", default: 0, comment: "sensitive=false" + t.datetime "no_sp_session_started_at", precision: nil, comment: "sensitive=false" + t.datetime "choose_method_view_at", precision: nil, comment: "sensitive=false" + t.integer "choose_method_view_count", default: 0, comment: "sensitive=false" + t.datetime "present_cac_view_at", precision: nil, comment: "sensitive=false" + t.integer "present_cac_view_count", default: 0, comment: "sensitive=false" + t.integer "present_cac_submit_count", default: 0, comment: "sensitive=false" + t.integer "present_cac_error_count", default: 0, comment: "sensitive=false" + t.datetime "enter_info_view_at", precision: nil, comment: "sensitive=false" + t.integer "enter_info_view_count", default: 0, comment: "sensitive=false" + t.datetime "success_view_at", precision: nil, comment: "sensitive=false" + t.integer "success_view_count", default: 0, comment: "sensitive=false" + t.integer "selfie_view_count", default: 0, comment: "sensitive=false" + t.integer "selfie_submit_count", default: 0, comment: "sensitive=false" + t.integer "selfie_error_count", default: 0, comment: "sensitive=false" + t.string "issuer", comment: "sensitive=false" + t.string "last_document_error", comment: "sensitive=false" + t.datetime "document_capture_view_at", precision: nil, comment: "sensitive=false" + t.integer "document_capture_view_count", default: 0, comment: "sensitive=false" + t.integer "document_capture_submit_count", default: 0, comment: "sensitive=false" + t.integer "document_capture_error_count", default: 0, comment: "sensitive=false" + t.datetime "agreement_view_at", precision: nil, comment: "sensitive=false" + t.integer "agreement_view_count", default: 0, comment: "sensitive=false" + t.string "state", comment: "sensitive=false" + t.datetime "verify_submit_at", precision: nil, comment: "sensitive=false" + t.integer "verify_phone_submit_count", default: 0, comment: "sensitive=false" + t.datetime "verify_phone_submit_at", precision: nil, comment: "sensitive=false" + t.datetime "document_capture_submit_at", precision: nil, comment: "sensitive=false" + t.datetime "back_image_submit_at", precision: nil, comment: "sensitive=false" + t.datetime "capture_mobile_back_image_submit_at", precision: nil, comment: "sensitive=false" + t.datetime "mobile_back_image_submit_at", precision: nil, comment: "sensitive=false" t.index ["issuer"], name: "index_doc_auth_logs_on_issuer" t.index ["user_id"], name: "index_doc_auth_logs_on_user_id", unique: true t.index ["verified_view_at"], name: "index_doc_auth_logs_on_verified_view_at" end create_table "document_capture_sessions", force: :cascade do |t| - t.string "uuid" - t.string "result_id" - t.bigint "user_id" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "requested_at", precision: nil - t.string "issuer" - t.datetime "cancelled_at", precision: nil - t.boolean "ocr_confirmation_pending", default: false - t.string "last_doc_auth_result" + t.string "uuid", comment: "sensitive=false" + t.string "result_id", comment: "sensitive=false" + t.bigint "user_id", comment: "sensitive=false" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "requested_at", precision: nil, comment: "sensitive=false" + t.string "issuer", comment: "sensitive=false" + t.datetime "cancelled_at", precision: nil, comment: "sensitive=false" + t.boolean "ocr_confirmation_pending", default: false, comment: "sensitive=false" + t.string "last_doc_auth_result", comment: "sensitive=false" t.index ["result_id"], name: "index_document_capture_sessions_on_result_id" t.index ["user_id"], name: "index_document_capture_sessions_on_user_id" t.index ["uuid"], name: "index_document_capture_sessions_on_uuid" end create_table "email_addresses", force: :cascade do |t| - t.bigint "user_id" - t.string "confirmation_token", limit: 255 - t.datetime "confirmed_at", precision: nil - t.datetime "confirmation_sent_at", precision: nil - t.string "email_fingerprint", default: "", null: false - t.string "encrypted_email", default: "", null: false - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "last_sign_in_at", precision: nil + t.bigint "user_id", comment: "sensitive=false" + t.string "confirmation_token", limit: 255, comment: "sensitive=true" + t.datetime "confirmed_at", precision: nil, comment: "sensitive=false" + t.datetime "confirmation_sent_at", precision: nil, comment: "sensitive=false" + t.string "email_fingerprint", default: "", null: false, comment: "sensitive=false" + t.string "encrypted_email", default: "", null: false, comment: "sensitive=true" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "last_sign_in_at", precision: nil, comment: "sensitive=false" t.index ["confirmation_token"], name: "index_email_addresses_on_confirmation_token", unique: true t.index ["email_fingerprint", "user_id"], name: "index_email_addresses_on_email_fingerprint_and_user_id", unique: true t.index ["email_fingerprint"], name: "index_email_addresses_on_email_fingerprint", unique: true, where: "(confirmed_at IS NOT NULL)" @@ -213,41 +213,41 @@ end create_table "events", id: :serial, force: :cascade do |t| - t.integer "user_id", null: false - t.integer "event_type", null: false - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.integer "device_id" - t.string "ip" - t.datetime "disavowed_at", precision: nil - t.string "disavowal_token_fingerprint" + t.integer "user_id", null: false, comment: "sensitive=false" + t.integer "event_type", null: false, comment: "sensitive=false" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" + t.integer "device_id", comment: "sensitive=false" + t.string "ip", comment: "sensitive=false" + t.datetime "disavowed_at", precision: nil, comment: "sensitive=false" + t.string "disavowal_token_fingerprint", comment: "sensitive=true" t.index ["device_id", "created_at"], name: "index_events_on_device_id_and_created_at" t.index ["disavowal_token_fingerprint"], name: "index_events_on_disavowal_token_fingerprint" t.index ["user_id", "created_at"], name: "index_events_on_user_id_and_created_at" end create_table "federal_email_domains", force: :cascade do |t| - t.citext "name", null: false + t.citext "name", null: false, comment: "sensitive=false" t.index ["name"], name: "index_federal_email_domains_on_name", unique: true end create_table "fraud_review_requests", force: :cascade do |t| - t.integer "user_id" - t.string "uuid" - t.string "irs_session_id" - t.string "login_session_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "user_id", comment: "sensitive=false" + t.string "uuid", comment: "sensitive=false" + t.string "irs_session_id", comment: "sensitive=false" + t.string "login_session_id", comment: "sensitive=false" + t.datetime "created_at", null: false, comment: "sensitive=false" + t.datetime "updated_at", null: false, comment: "sensitive=false" t.index ["user_id"], name: "index_fraud_review_requests_on_user_id" end create_table "iaa_gtcs", force: :cascade do |t| - t.string "gtc_number", null: false - t.integer "mod_number", default: 0, null: false - t.date "start_date" - t.date "end_date" - t.decimal "estimated_amount", precision: 12, scale: 2 - t.bigint "partner_account_id" + t.string "gtc_number", null: false, comment: "sensitive=false" + t.integer "mod_number", default: 0, null: false, comment: "sensitive=false" + t.date "start_date", comment: "sensitive=false" + t.date "end_date", comment: "sensitive=false" + t.decimal "estimated_amount", precision: 12, scale: 2, comment: "sensitive=false" + t.bigint "partner_account_id", comment: "sensitive=false" t.index ["gtc_number"], name: "index_iaa_gtcs_on_gtc_number", unique: true t.index ["partner_account_id"], name: "index_iaa_gtcs_on_partner_account_id" t.check_constraint "end_date IS NOT NULL", name: "iaa_gtcs_end_date_null" @@ -255,13 +255,13 @@ end create_table "iaa_orders", force: :cascade do |t| - t.integer "order_number", null: false - t.integer "mod_number", default: 0, null: false - t.date "start_date" - t.date "end_date" - t.decimal "estimated_amount", precision: 12, scale: 2 - t.integer "pricing_model", default: 2, null: false - t.bigint "iaa_gtc_id" + t.integer "order_number", null: false, comment: "sensitive=false" + t.integer "mod_number", default: 0, null: false, comment: "sensitive=false" + t.date "start_date", comment: "sensitive=false" + t.date "end_date", comment: "sensitive=false" + t.decimal "estimated_amount", precision: 12, scale: 2, comment: "sensitive=false" + t.integer "pricing_model", default: 2, null: false, comment: "sensitive=false" + t.bigint "iaa_gtc_id", comment: "sensitive=false" t.index ["iaa_gtc_id", "order_number"], name: "index_iaa_orders_on_iaa_gtc_id_and_order_number", unique: true t.index ["iaa_gtc_id"], name: "index_iaa_orders_on_iaa_gtc_id" t.check_constraint "end_date IS NOT NULL", name: "iaa_orders_end_date_null" @@ -269,30 +269,30 @@ end create_table "identities", id: :serial, force: :cascade do |t| - t.string "service_provider", limit: 255 - t.datetime "last_authenticated_at", precision: nil - t.integer "user_id" - t.datetime "created_at", precision: nil - t.datetime "updated_at", precision: nil - t.string "session_uuid", limit: 255 - t.string "uuid", null: false - t.string "nonce" - t.integer "ial", default: 1 - t.string "access_token" - t.string "scope" - t.string "code_challenge" - t.string "rails_session_id" - t.json "verified_attributes" - t.datetime "verified_at", precision: nil - t.datetime "last_consented_at", precision: nil - t.datetime "last_ial1_authenticated_at", precision: nil - t.datetime "last_ial2_authenticated_at", precision: nil - t.datetime "deleted_at", precision: nil - t.integer "aal" - t.text "requested_aal_value" - t.string "vtr" - t.string "acr_values" - t.bigint "email_address_id" + t.string "service_provider", limit: 255, comment: "sensitive=false" + t.datetime "last_authenticated_at", precision: nil, comment: "sensitive=false" + t.integer "user_id", comment: "sensitive=false" + t.datetime "created_at", precision: nil, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, comment: "sensitive=false" + t.string "session_uuid", limit: 255, comment: "sensitive=true" + t.string "uuid", null: false, comment: "sensitive=false" + t.string "nonce", comment: "sensitive=false" + t.integer "ial", default: 1, comment: "sensitive=false" + t.string "access_token", comment: "sensitive=true" + t.string "scope", comment: "sensitive=false" + t.string "code_challenge", comment: "sensitive=true" + t.string "rails_session_id", comment: "sensitive=true" + t.json "verified_attributes", comment: "sensitive=false" + t.datetime "verified_at", precision: nil, comment: "sensitive=false" + t.datetime "last_consented_at", precision: nil, comment: "sensitive=false" + t.datetime "last_ial1_authenticated_at", precision: nil, comment: "sensitive=false" + t.datetime "last_ial2_authenticated_at", precision: nil, comment: "sensitive=false" + t.datetime "deleted_at", precision: nil, comment: "sensitive=false" + t.integer "aal", comment: "sensitive=false" + t.text "requested_aal_value", comment: "sensitive=false" + t.string "vtr", comment: "sensitive=false" + t.string "acr_values", comment: "sensitive=false" + t.bigint "email_address_id", comment: "sensitive=false" t.index ["access_token"], name: "index_identities_on_access_token", unique: true t.index ["session_uuid"], name: "index_identities_on_session_uuid", unique: true t.index ["user_id", "service_provider"], name: "index_identities_on_user_id_and_service_provider", unique: true @@ -300,31 +300,31 @@ end create_table "in_person_enrollments", comment: "Details and status of an in-person proofing enrollment for one user and profile", force: :cascade do |t| - t.bigint "user_id", null: false, comment: "Foreign key to the user this enrollment belongs to" - t.bigint "profile_id", comment: "Foreign key to the profile this enrollment belongs to" - t.string "enrollment_code", comment: "The code returned by the USPS service" - t.datetime "status_check_attempted_at", precision: nil, comment: "The last time a status check was attempted" - t.datetime "status_updated_at", precision: nil, comment: "The last time the status was successfully updated with a value from the USPS API" - t.integer "status", default: 0, comment: "The status of the enrollment" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.boolean "current_address_matches_id", comment: "True if the user indicates that their current address matches the address on the ID they're bringing to the Post Office." - t.jsonb "selected_location_details", comment: "The location details of the Post Office the user selected (including title, address, hours of operation)" - t.string "unique_id", comment: "Unique ID to use with the USPS service" - t.datetime "enrollment_established_at", comment: "When the enrollment was successfully established" - t.string "issuer", comment: "Issuer associated with the enrollment at time of creation" - t.boolean "follow_up_survey_sent", default: false - t.boolean "early_reminder_sent", default: false, comment: "early reminder to complete IPP before deadline sent" - t.boolean "late_reminder_sent", default: false, comment: "late reminder to complete IPP before deadline sent" - t.boolean "deadline_passed_sent", default: false, comment: "deadline passed email sent for expired enrollment" - t.datetime "proofed_at", precision: nil, comment: "timestamp when user attempted to proof at a Post Office" - t.boolean "capture_secondary_id_enabled", default: false, comment: "record and proof state ID and residential addresses separately" - t.datetime "status_check_completed_at", comment: "The last time a status check was successfully completed" - t.boolean "ready_for_status_check", default: false - t.datetime "notification_sent_at", comment: "The time a notification was sent" - t.datetime "last_batch_claimed_at" - t.string "sponsor_id", null: false - t.string "doc_auth_result" + t.bigint "user_id", null: false, comment: "Foreign key to the user this enrollment belongs to sensitive=false" + t.bigint "profile_id", comment: "Foreign key to the profile this enrollment belongs to sensitive=false" + t.string "enrollment_code", comment: "The code returned by the USPS service sensitive=false" + t.datetime "status_check_attempted_at", precision: nil, comment: "The last time a status check was attempted sensitive=false" + t.datetime "status_updated_at", precision: nil, comment: "The last time the status was successfully updated with a value from the USPS API sensitive=false" + t.integer "status", default: 0, comment: "The status of the enrollment sensitive=false" + t.datetime "created_at", null: false, comment: "sensitive=false" + t.datetime "updated_at", null: false, comment: "sensitive=false" + t.boolean "current_address_matches_id", comment: "True if the user indicates that their current address matches the address on the ID they're bringing to the Post Office. sensitive=false" + t.jsonb "selected_location_details", comment: "The location details of the Post Office the user selected (including title, address, hours of operation) sensitive=false" + t.string "unique_id", comment: "Unique ID to use with the USPS service sensitive=false" + t.datetime "enrollment_established_at", comment: "When the enrollment was successfully established sensitive=false" + t.string "issuer", comment: "Issuer associated with the enrollment at time of creation sensitive=false" + t.boolean "follow_up_survey_sent", default: false, comment: "sensitive=false" + t.boolean "early_reminder_sent", default: false, comment: "early reminder to complete IPP before deadline sent sensitive=false" + t.boolean "late_reminder_sent", default: false, comment: "late reminder to complete IPP before deadline sent sensitive=false" + t.boolean "deadline_passed_sent", default: false, comment: "deadline passed email sent for expired enrollment sensitive=false" + t.datetime "proofed_at", precision: nil, comment: "timestamp when user attempted to proof at a Post Office sensitive=false" + t.boolean "capture_secondary_id_enabled", default: false, comment: "record and proof state ID and residential addresses separately sensitive=false" + t.datetime "status_check_completed_at", comment: "The last time a status check was successfully completed sensitive=false" + t.boolean "ready_for_status_check", default: false, comment: "sensitive=false" + t.datetime "notification_sent_at", comment: "The time a notification was sent sensitive=false" + t.datetime "last_batch_claimed_at", comment: "sensitive=false" + t.string "sponsor_id", null: false, comment: "sensitive=false" + t.string "doc_auth_result", comment: "sensitive=false" t.index ["profile_id"], name: "index_in_person_enrollments_on_profile_id" t.index ["ready_for_status_check"], name: "index_in_person_enrollments_on_ready_for_status_check", where: "(ready_for_status_check = true)" t.index ["status_check_attempted_at"], name: "index_in_person_enrollments_on_status_check_attempted_at", where: "(status = 1)" @@ -334,28 +334,28 @@ end create_table "integration_statuses", force: :cascade do |t| - t.string "name", null: false - t.integer "order", null: false - t.string "partner_name" + t.string "name", null: false, comment: "sensitive=false" + t.integer "order", null: false, comment: "sensitive=false" + t.string "partner_name", comment: "sensitive=false" t.index ["name"], name: "index_integration_statuses_on_name", unique: true t.index ["order"], name: "index_integration_statuses_on_order", unique: true end create_table "integration_usages", force: :cascade do |t| - t.bigint "iaa_order_id" - t.bigint "integration_id" + t.bigint "iaa_order_id", comment: "sensitive=false" + t.bigint "integration_id", comment: "sensitive=false" t.index ["iaa_order_id", "integration_id"], name: "index_integration_usages_on_iaa_order_id_and_integration_id", unique: true t.index ["iaa_order_id"], name: "index_integration_usages_on_iaa_order_id" t.index ["integration_id"], name: "index_integration_usages_on_integration_id" end create_table "integrations", force: :cascade do |t| - t.string "issuer", null: false - t.string "name", null: false - t.integer "dashboard_identifier" - t.bigint "partner_account_id" - t.bigint "integration_status_id" - t.bigint "service_provider_id" + t.string "issuer", null: false, comment: "sensitive=false" + t.string "name", null: false, comment: "sensitive=false" + t.integer "dashboard_identifier", comment: "sensitive=false" + t.bigint "partner_account_id", comment: "sensitive=false" + t.bigint "integration_status_id", comment: "sensitive=false" + t.bigint "service_provider_id", comment: "sensitive=false" t.index ["dashboard_identifier"], name: "index_integrations_on_dashboard_identifier", unique: true t.index ["integration_status_id"], name: "index_integrations_on_integration_status_id" t.index ["issuer"], name: "index_integrations_on_issuer", unique: true @@ -364,35 +364,35 @@ end create_table "letter_requests_to_usps_ftp_logs", force: :cascade do |t| - t.datetime "ftp_at", precision: nil, null: false - t.integer "letter_requests_count", null: false + t.datetime "ftp_at", precision: nil, null: false, comment: "sensitive=false" + t.integer "letter_requests_count", null: false, comment: "sensitive=false" t.index ["ftp_at"], name: "index_letter_requests_to_usps_ftp_logs_on_ftp_at" end create_table "notification_phone_configurations", force: :cascade do |t| - t.bigint "in_person_enrollment_id", null: false - t.text "encrypted_phone", null: false, comment: "Encrypted phone number to send notifications to" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.bigint "in_person_enrollment_id", null: false, comment: "sensitive=false" + t.text "encrypted_phone", null: false, comment: "Encrypted phone number to send notifications to sensitive=true" + t.datetime "created_at", null: false, comment: "sensitive=false" + t.datetime "updated_at", null: false, comment: "sensitive=false" t.index ["in_person_enrollment_id"], name: "index_notification_phone_configurations_on_enrollment_id", unique: true end create_table "partner_account_statuses", force: :cascade do |t| - t.string "name", null: false - t.integer "order", null: false - t.string "partner_name" + t.string "name", null: false, comment: "sensitive=false" + t.integer "order", null: false, comment: "sensitive=false" + t.string "partner_name", comment: "sensitive=false" t.index ["name"], name: "index_partner_account_statuses_on_name", unique: true t.index ["order"], name: "index_partner_account_statuses_on_order", unique: true end create_table "partner_accounts", force: :cascade do |t| - t.string "name", null: false - t.text "description" - t.string "requesting_agency", null: false - t.date "became_partner" - t.bigint "agency_id" - t.bigint "partner_account_status_id" - t.bigint "crm_id" + t.string "name", null: false, comment: "sensitive=false" + t.text "description", comment: "sensitive=false" + t.string "requesting_agency", null: false, comment: "sensitive=false" + t.date "became_partner", comment: "sensitive=false" + t.bigint "agency_id", comment: "sensitive=false" + t.bigint "partner_account_status_id", comment: "sensitive=false" + t.bigint "crm_id", comment: "sensitive=false" t.index ["agency_id"], name: "index_partner_accounts_on_agency_id" t.index ["name"], name: "index_partner_accounts_on_name", unique: true t.index ["partner_account_status_id"], name: "index_partner_accounts_on_partner_account_status_id" @@ -400,63 +400,63 @@ end create_table "phone_configurations", force: :cascade do |t| - t.bigint "user_id", null: false - t.text "encrypted_phone", null: false - t.integer "delivery_preference", default: 0, null: false - t.boolean "mfa_enabled", default: true, null: false - t.datetime "confirmation_sent_at", precision: nil - t.datetime "confirmed_at", precision: nil - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "made_default_at", precision: nil + t.bigint "user_id", null: false, comment: "sensitive=false" + t.text "encrypted_phone", null: false, comment: "sensitive=false" + t.integer "delivery_preference", default: 0, null: false, comment: "sensitive=false" + t.boolean "mfa_enabled", default: true, null: false, comment: "sensitive=false" + t.datetime "confirmation_sent_at", precision: nil, comment: "sensitive=false" + t.datetime "confirmed_at", precision: nil, comment: "sensitive=false" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "made_default_at", precision: nil, comment: "sensitive=false" t.index ["user_id", "made_default_at", "created_at"], name: "index_phone_configurations_on_made_default_at" end create_table "phone_number_opt_outs", force: :cascade do |t| - t.string "encrypted_phone" - t.string "phone_fingerprint", null: false - t.string "uuid" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "encrypted_phone", comment: "sensitive=false" + t.string "phone_fingerprint", null: false, comment: "sensitive=false" + t.string "uuid", comment: "sensitive=false" + t.datetime "created_at", null: false, comment: "sensitive=false" + t.datetime "updated_at", null: false, comment: "sensitive=false" t.index ["phone_fingerprint"], name: "index_phone_number_opt_outs_on_phone_fingerprint", unique: true t.index ["uuid"], name: "index_phone_number_opt_outs_on_uuid", unique: true end create_table "piv_cac_configurations", force: :cascade do |t| - t.integer "user_id", null: false - t.string "x509_dn_uuid", null: false - t.string "name", null: false - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.string "x509_issuer" + t.integer "user_id", null: false, comment: "sensitive=false" + t.string "x509_dn_uuid", null: false, comment: "sensitive=false" + t.string "name", null: false, comment: "sensitive=false" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" + t.string "x509_issuer", comment: "sensitive=false" t.index ["user_id", "created_at"], name: "index_piv_cac_configurations_on_user_id_and_created_at", unique: true t.index ["user_id", "name"], name: "index_piv_cac_configurations_on_user_id_and_name", unique: true t.index ["x509_dn_uuid"], name: "index_piv_cac_configurations_on_x509_dn_uuid", unique: true end create_table "profiles", id: :serial, force: :cascade do |t| - t.integer "user_id", null: false - t.boolean "active", default: false, null: false - t.datetime "verified_at", precision: nil - t.datetime "activated_at", precision: nil - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.text "encrypted_pii" - t.string "ssn_signature", limit: 64 - t.text "encrypted_pii_recovery" - t.integer "deactivation_reason" - t.jsonb "proofing_components" - t.string "name_zip_birth_year_signature" - t.string "initiating_service_provider_issuer" - t.datetime "fraud_review_pending_at" - t.datetime "fraud_rejection_at" - t.datetime "gpo_verification_pending_at" - t.integer "fraud_pending_reason" - t.datetime "in_person_verification_pending_at" - t.text "encrypted_pii_multi_region" - t.text "encrypted_pii_recovery_multi_region" - t.datetime "gpo_verification_expired_at" - t.integer "idv_level" + t.integer "user_id", null: false, comment: "sensitive=false" + t.boolean "active", default: false, null: false, comment: "sensitive=false" + t.datetime "verified_at", precision: nil, comment: "sensitive=false" + t.datetime "activated_at", precision: nil, comment: "sensitive=false" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" + t.text "encrypted_pii", comment: "sensitive=true" + t.string "ssn_signature", limit: 64, comment: "sensitive=true" + t.text "encrypted_pii_recovery", comment: "sensitive=true" + t.integer "deactivation_reason", comment: "sensitive=false" + t.jsonb "proofing_components", comment: "sensitive=false" + t.string "name_zip_birth_year_signature", comment: "sensitive=true" + t.string "initiating_service_provider_issuer", comment: "sensitive=false" + t.datetime "fraud_review_pending_at", comment: "sensitive=false" + t.datetime "fraud_rejection_at", comment: "sensitive=false" + t.datetime "gpo_verification_pending_at", comment: "sensitive=false" + t.integer "fraud_pending_reason", comment: "sensitive=false" + t.datetime "in_person_verification_pending_at", comment: "sensitive=false" + t.text "encrypted_pii_multi_region", comment: "sensitive=false" + t.text "encrypted_pii_recovery_multi_region", comment: "sensitive=false" + t.datetime "gpo_verification_expired_at", comment: "sensitive=false" + t.integer "idv_level", comment: "sensitive=false" t.index ["fraud_pending_reason"], name: "index_profiles_on_fraud_pending_reason" t.index ["fraud_rejection_at"], name: "index_profiles_on_fraud_rejection_at" t.index ["fraud_review_pending_at"], name: "index_profiles_on_fraud_review_pending_at" @@ -469,205 +469,205 @@ end create_table "proofing_components", force: :cascade do |t| - t.integer "user_id", null: false - t.string "document_check" - t.string "document_type" - t.string "source_check" - t.string "resolution_check" - t.string "address_check" - t.datetime "verified_at", precision: nil - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.string "liveness_check" - t.string "device_fingerprinting_vendor" - t.boolean "threatmetrix" - t.string "threatmetrix_review_status" - t.string "threatmetrix_risk_rating" - t.string "threatmetrix_policy_score" + t.integer "user_id", null: false, comment: "sensitive=false" + t.string "document_check", comment: "sensitive=false" + t.string "document_type", comment: "sensitive=false" + t.string "source_check", comment: "sensitive=false" + t.string "resolution_check", comment: "sensitive=false" + t.string "address_check", comment: "sensitive=false" + t.datetime "verified_at", precision: nil, comment: "sensitive=false" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" + t.string "liveness_check", comment: "sensitive=false" + t.string "device_fingerprinting_vendor", comment: "sensitive=false" + t.boolean "threatmetrix", comment: "sensitive=false" + t.string "threatmetrix_review_status", comment: "sensitive=false" + t.string "threatmetrix_risk_rating", comment: "sensitive=false" + t.string "threatmetrix_policy_score", comment: "sensitive=false" t.index ["user_id"], name: "index_proofing_components_on_user_id", unique: true t.index ["verified_at"], name: "index_proofing_components_on_verified_at" end create_table "registration_logs", force: :cascade do |t| - t.integer "user_id", null: false - t.datetime "registered_at", precision: nil + t.integer "user_id", null: false, comment: "sensitive=false" + t.datetime "registered_at", precision: nil, comment: "sensitive=false" t.index ["registered_at"], name: "index_registration_logs_on_registered_at" t.index ["user_id"], name: "index_registration_logs_on_user_id", unique: true end create_table "security_events", force: :cascade do |t| - t.bigint "user_id", null: false - t.string "event_type", null: false - t.string "jti" - t.string "issuer" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "occurred_at", precision: nil + t.bigint "user_id", null: false, comment: "sensitive=false" + t.string "event_type", null: false, comment: "sensitive=false" + t.string "jti", comment: "sensitive=false" + t.string "issuer", comment: "sensitive=false" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "occurred_at", precision: nil, comment: "sensitive=false" t.index ["jti", "user_id", "issuer"], name: "index_security_events_on_jti_and_user_id_and_issuer", unique: true t.index ["user_id"], name: "index_security_events_on_user_id" end create_table "service_providers", id: :serial, force: :cascade do |t| - t.string "issuer", null: false - t.string "friendly_name" - t.text "description" - t.text "metadata_url" - t.text "acs_url" - t.text "assertion_consumer_logout_service_url" - t.text "logo" - t.string "signature" - t.string "block_encryption", default: "aes256-cbc", null: false - t.text "sp_initiated_login_url" - t.text "return_to_sp_url" - t.json "attribute_bundle" - t.datetime "created_at", precision: nil - t.datetime "updated_at", precision: nil - t.boolean "active", default: false, null: false - t.boolean "approved", default: false, null: false - t.boolean "native", default: false, null: false - t.string "redirect_uris", default: [], array: true - t.integer "agency_id" - t.text "failure_to_proof_url" - t.integer "ial" - t.boolean "piv_cac", default: false - t.boolean "piv_cac_scoped_by_email", default: false - t.boolean "pkce" - t.string "push_notification_url" - t.jsonb "help_text", default: {"sign_in"=>{}, "sign_up"=>{}, "forgot_password"=>{}} - t.boolean "allow_prompt_login", default: false - t.boolean "signed_response_message_requested", default: false - t.string "remote_logo_key" - t.date "launch_date" - t.string "iaa" - t.date "iaa_start_date" - t.date "iaa_end_date" - t.string "app_id" - t.integer "default_aal" - t.string "certs", array: true - t.boolean "email_nameid_format_allowed", default: false - t.boolean "use_legacy_name_id_behavior", default: false - t.boolean "irs_attempts_api_enabled" - t.boolean "in_person_proofing_enabled", default: false + t.string "issuer", null: false, comment: "sensitive=false" + t.string "friendly_name", comment: "sensitive=false" + t.text "description", comment: "sensitive=false" + t.text "metadata_url", comment: "sensitive=false" + t.text "acs_url", comment: "sensitive=false" + t.text "assertion_consumer_logout_service_url", comment: "sensitive=false" + t.text "logo", comment: "sensitive=false" + t.string "signature", comment: "sensitive=false" + t.string "block_encryption", default: "aes256-cbc", null: false, comment: "sensitive=true" + t.text "sp_initiated_login_url", comment: "sensitive=false" + t.text "return_to_sp_url", comment: "sensitive=false" + t.json "attribute_bundle", comment: "sensitive=false" + t.datetime "created_at", precision: nil, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, comment: "sensitive=false" + t.boolean "active", default: false, null: false, comment: "sensitive=false" + t.boolean "approved", default: false, null: false, comment: "sensitive=false" + t.boolean "native", default: false, null: false, comment: "sensitive=false" + t.string "redirect_uris", default: [], comment: "sensitive=false", array: true + t.integer "agency_id", comment: "sensitive=false" + t.text "failure_to_proof_url", comment: "sensitive=false" + t.integer "ial", comment: "sensitive=false" + t.boolean "piv_cac", default: false, comment: "sensitive=false" + t.boolean "piv_cac_scoped_by_email", default: false, comment: "sensitive=false" + t.boolean "pkce", comment: "sensitive=false" + t.string "push_notification_url", comment: "sensitive=false" + t.jsonb "help_text", default: {"sign_in"=>{}, "sign_up"=>{}, "forgot_password"=>{}}, comment: "sensitive=false" + t.boolean "allow_prompt_login", default: false, comment: "sensitive=false" + t.boolean "signed_response_message_requested", default: false, comment: "sensitive=false" + t.string "remote_logo_key", comment: "sensitive=false" + t.date "launch_date", comment: "sensitive=false" + t.string "iaa", comment: "sensitive=false" + t.date "iaa_start_date", comment: "sensitive=false" + t.date "iaa_end_date", comment: "sensitive=false" + t.string "app_id", comment: "sensitive=false" + t.integer "default_aal", comment: "sensitive=false" + t.string "certs", comment: "sensitive=false", array: true + t.boolean "email_nameid_format_allowed", default: false, comment: "sensitive=false" + t.boolean "use_legacy_name_id_behavior", default: false, comment: "sensitive=false" + t.boolean "irs_attempts_api_enabled", comment: "sensitive=false" + t.boolean "in_person_proofing_enabled", default: false, comment: "sensitive=false" t.index ["issuer"], name: "index_service_providers_on_issuer", unique: true end create_table "sign_in_restrictions", force: :cascade do |t| - t.integer "user_id", null: false - t.string "service_provider" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "user_id", null: false, comment: "sensitive=false" + t.string "service_provider", comment: "sensitive=false" + t.datetime "created_at", null: false, comment: "sensitive=false" + t.datetime "updated_at", null: false, comment: "sensitive=false" t.index ["user_id", "service_provider"], name: "index_sign_in_restrictions_on_user_id_and_service_provider", unique: true end create_table "sp_costs", force: :cascade do |t| - t.string "issuer", null: false - t.integer "agency_id", null: false - t.string "cost_type", null: false - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.integer "ial" - t.string "transaction_id" + t.string "issuer", null: false, comment: "sensitive=false" + t.integer "agency_id", null: false, comment: "sensitive=false" + t.string "cost_type", null: false, comment: "sensitive=false" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" + t.integer "ial", comment: "sensitive=false" + t.string "transaction_id", comment: "sensitive=false" t.index ["created_at"], name: "index_sp_costs_on_created_at" end create_table "sp_return_logs", force: :cascade do |t| - t.datetime "requested_at", precision: nil, null: false - t.string "request_id", null: false - t.integer "ial", null: false - t.string "issuer", null: false - t.integer "user_id" - t.datetime "returned_at", precision: nil - t.boolean "billable" - t.bigint "profile_id" - t.datetime "profile_verified_at" - t.string "profile_requested_issuer" + t.datetime "requested_at", precision: nil, null: false, comment: "sensitive=false" + t.string "request_id", null: false, comment: "sensitive=false" + t.integer "ial", null: false, comment: "sensitive=false" + t.string "issuer", null: false, comment: "sensitive=false" + t.integer "user_id", comment: "sensitive=false" + t.datetime "returned_at", precision: nil, comment: "sensitive=false" + t.boolean "billable", comment: "sensitive=false" + t.bigint "profile_id", comment: "sensitive=false" + t.datetime "profile_verified_at", comment: "sensitive=false" + t.string "profile_requested_issuer", comment: "sensitive=false" t.index "((returned_at)::date), issuer", name: "index_sp_return_logs_on_returned_at_date_issuer", where: "((billable = true) AND (returned_at IS NOT NULL))" t.index ["request_id"], name: "index_sp_return_logs_on_request_id", unique: true end create_table "sp_upgraded_biometric_profiles", force: :cascade do |t| - t.datetime "upgraded_at", null: false - t.bigint "user_id", null: false - t.string "idv_level", null: false - t.string "issuer", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "upgraded_at", null: false, comment: "sensitive=false" + t.bigint "user_id", null: false, comment: "sensitive=false" + t.string "idv_level", null: false, comment: "sensitive=false" + t.string "issuer", null: false, comment: "sensitive=false" + t.datetime "created_at", null: false, comment: "sensitive=false" + t.datetime "updated_at", null: false, comment: "sensitive=false" t.index ["issuer", "upgraded_at"], name: "index_sp_upgraded_biometric_profiles_on_issuer_and_upgraded_at" t.index ["user_id"], name: "index_sp_upgraded_biometric_profiles_on_user_id" end create_table "suspended_emails", force: :cascade do |t| - t.bigint "email_address_id", null: false - t.string "digested_base_email", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.bigint "email_address_id", null: false, comment: "sensitive=false" + t.string "digested_base_email", null: false, comment: "sensitive=false" + t.datetime "created_at", null: false, comment: "sensitive=false" + t.datetime "updated_at", null: false, comment: "sensitive=false" t.index ["digested_base_email"], name: "index_suspended_emails_on_digested_base_email" t.index ["email_address_id"], name: "index_suspended_emails_on_email_address_id" end create_table "users", id: :serial, force: :cascade do |t| - t.string "reset_password_token", limit: 255 - t.datetime "reset_password_sent_at", precision: nil - t.datetime "created_at", precision: nil - t.datetime "updated_at", precision: nil - t.datetime "confirmed_at", precision: nil - t.integer "second_factor_attempts_count", default: 0 - t.string "uuid", limit: 255, null: false - t.datetime "second_factor_locked_at", precision: nil - t.datetime "phone_confirmed_at", precision: nil - t.string "direct_otp" - t.datetime "direct_otp_sent_at", precision: nil - t.string "unique_session_id" - t.integer "otp_delivery_preference", default: 0, null: false - t.string "encrypted_password_digest", default: "" - t.string "encrypted_recovery_code_digest", default: "" - t.datetime "remember_device_revoked_at", precision: nil - t.string "email_language", limit: 10 - t.datetime "accepted_terms_at", precision: nil - t.datetime "encrypted_recovery_code_digest_generated_at", precision: nil - t.datetime "suspended_at" - t.datetime "reinstated_at" - t.string "encrypted_password_digest_multi_region" - t.string "encrypted_recovery_code_digest_multi_region" - t.datetime "second_mfa_reminder_dismissed_at" - t.datetime "piv_cac_recommended_dismissed_at" - t.datetime "sign_in_new_device_at" - t.datetime "password_compromised_checked_at" + t.string "reset_password_token", limit: 255, comment: "sensitive=true" + t.datetime "reset_password_sent_at", precision: nil, comment: "sensitive=false" + t.datetime "created_at", precision: nil, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, comment: "sensitive=false" + t.datetime "confirmed_at", precision: nil, comment: "sensitive=false" + t.integer "second_factor_attempts_count", default: 0, comment: "sensitive=false" + t.string "uuid", limit: 255, null: false, comment: "sensitive=false" + t.datetime "second_factor_locked_at", precision: nil, comment: "sensitive=false" + t.datetime "phone_confirmed_at", precision: nil, comment: "sensitive=false" + t.string "direct_otp", comment: "sensitive=true" + t.datetime "direct_otp_sent_at", precision: nil, comment: "sensitive=false" + t.string "unique_session_id", comment: "sensitive=false" + t.integer "otp_delivery_preference", default: 0, null: false, comment: "sensitive=false" + t.string "encrypted_password_digest", default: "", comment: "sensitive=true" + t.string "encrypted_recovery_code_digest", default: "", comment: "sensitive=true" + t.datetime "remember_device_revoked_at", precision: nil, comment: "sensitive=false" + t.string "email_language", limit: 10, comment: "sensitive=false" + t.datetime "accepted_terms_at", precision: nil, comment: "sensitive=false" + t.datetime "encrypted_recovery_code_digest_generated_at", precision: nil, comment: "sensitive=false" + t.datetime "suspended_at", comment: "sensitive=false" + t.datetime "reinstated_at", comment: "sensitive=false" + t.string "encrypted_password_digest_multi_region", comment: "sensitive=false" + t.string "encrypted_recovery_code_digest_multi_region", comment: "sensitive=false" + t.datetime "second_mfa_reminder_dismissed_at", comment: "sensitive=false" + t.datetime "piv_cac_recommended_dismissed_at", comment: "sensitive=false" + t.datetime "sign_in_new_device_at", comment: "sensitive=false" + t.datetime "password_compromised_checked_at", comment: "sensitive=false" t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true t.index ["sign_in_new_device_at"], name: "index_users_on_sign_in_new_device_at" t.index ["uuid"], name: "index_users_on_uuid", unique: true end create_table "usps_confirmation_codes", force: :cascade do |t| - t.integer "profile_id", null: false - t.string "otp_fingerprint", null: false - t.datetime "code_sent_at", precision: nil, default: -> { "CURRENT_TIMESTAMP" }, null: false - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.datetime "reminder_sent_at", precision: nil + t.integer "profile_id", null: false, comment: "sensitive=false" + t.string "otp_fingerprint", null: false, comment: "sensitive=true" + t.datetime "code_sent_at", precision: nil, default: -> { "CURRENT_TIMESTAMP" }, null: false, comment: "sensitive=false" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "reminder_sent_at", precision: nil, comment: "sensitive=false" t.index ["otp_fingerprint"], name: "index_usps_confirmation_codes_on_otp_fingerprint" t.index ["profile_id"], name: "index_usps_confirmation_codes_on_profile_id" t.index ["reminder_sent_at"], name: "index_usps_confirmation_codes_on_reminder_sent_at" end create_table "usps_confirmations", id: :serial, force: :cascade do |t| - t.text "entry", null: false - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.text "entry_multi_region" + t.text "entry", null: false, comment: "sensitive=false" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" + t.text "entry_multi_region", comment: "sensitive=false" end create_table "webauthn_configurations", force: :cascade do |t| - t.bigint "user_id", null: false - t.string "name", null: false - t.text "credential_id", null: false - t.text "credential_public_key", null: false - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.boolean "platform_authenticator" - t.string "transports", array: true - t.jsonb "authenticator_data_flags" - t.string "aaguid" + t.bigint "user_id", null: false, comment: "sensitive=false" + t.string "name", null: false, comment: "sensitive=false" + t.text "credential_id", null: false, comment: "sensitive=false" + t.text "credential_public_key", null: false, comment: "sensitive=false" + t.datetime "created_at", precision: nil, null: false, comment: "sensitive=false" + t.datetime "updated_at", precision: nil, null: false, comment: "sensitive=false" + t.boolean "platform_authenticator", comment: "sensitive=false" + t.string "transports", comment: "sensitive=false", array: true + t.jsonb "authenticator_data_flags", comment: "sensitive=false" + t.string "aaguid", comment: "sensitive=false" t.index ["user_id"], name: "index_webauthn_configurations_on_user_id" end diff --git a/lib/tasks/column_comment_checker.rake b/lib/tasks/column_comment_checker.rake new file mode 100644 index 00000000000..56184ea1dcd --- /dev/null +++ b/lib/tasks/column_comment_checker.rake @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +namespace :db do + desc 'Check for columns with sensitivity comments' + task check_for_sensitive_columns: :environment do + puts 'Checking for columns with sensitivity comments...' + tables = ActiveRecord::Base.connection.tables - %w[schema_migrations ar_internal_metadata] + missing_columns = [] + + tables.each do |table| + ActiveRecord::Base.connection.columns(table).each do |column| + next if column.name == 'id' + + if !column.comment&.match?(/sensitive=(true|false)/i) + missing_columns << "#{table}##{column.name}" + end + end + end + + if missing_columns.any? + puts 'Columns with sensitivity comments found:' + missing_columns.each { |column| puts column } + puts <<-INFO + In your migration, add 'comment: sensitive=false'(or true for sensitive data) + to all of the listed columns." + INFO + else + puts 'All columns have sensitivity comments.' + end + end +end diff --git a/spec/db/schema_spec.rb b/spec/db/schema_spec.rb new file mode 100644 index 00000000000..11bd61b29dd --- /dev/null +++ b/spec/db/schema_spec.rb @@ -0,0 +1,30 @@ +require 'rails_helper' + +RSpec.describe 'db:check_for_sensitive_columns' do + before :all do + Rake.application.rake_require 'tasks/column_comment_checker' + Rake::Task.define_task(:environment) + end + + let(:task) { Rake::Task['db:check_for_sensitive_columns'] } + + it 'checks for columns with sensitivity comments' do + expect { task.execute }.to output(/All columns have sensitivity comments./).to_stdout + end + + context 'when a column is missing a sensitivity comment' do + before do + ActiveRecord::Base.connection.add_column :users, :test_column, :string + end + + after do + ActiveRecord::Base.connection.remove_column :users, :test_column + end + + it 'displays the missing column directions' do + expect { task.execute }.to output( + /In your migration, add 'comment: sensitive=false'\(or true for sensitive data\)/, + ).to_stdout + end + end +end