From a6bef84a937178daf480a997403c1cb20202ec6b Mon Sep 17 00:00:00 2001 From: Vraj Mohan Date: Wed, 16 Apr 2025 11:56:51 -0700 Subject: [PATCH] Add table to record user confirmation of duplicate profiles changelog: Upcoming Features, One Account, Add table to record user confirmation of duplicate profiles --- app/models/duplicate_profile_confirmation.rb | 4 ++++ ...181519_create_duplicate_profile_confirmations.rb | 12 ++++++++++++ db/schema.rb | 13 ++++++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 app/models/duplicate_profile_confirmation.rb create mode 100644 db/primary_migrate/20250416181519_create_duplicate_profile_confirmations.rb diff --git a/app/models/duplicate_profile_confirmation.rb b/app/models/duplicate_profile_confirmation.rb new file mode 100644 index 00000000000..783969da4af --- /dev/null +++ b/app/models/duplicate_profile_confirmation.rb @@ -0,0 +1,4 @@ +# frozen_string_literal: true + +class DuplicateProfileConfirmation < ApplicationRecord +end diff --git a/db/primary_migrate/20250416181519_create_duplicate_profile_confirmations.rb b/db/primary_migrate/20250416181519_create_duplicate_profile_confirmations.rb new file mode 100644 index 00000000000..3d82532b514 --- /dev/null +++ b/db/primary_migrate/20250416181519_create_duplicate_profile_confirmations.rb @@ -0,0 +1,12 @@ +class CreateDuplicateProfileConfirmations < ActiveRecord::Migration[8.0] + def change + create_table :duplicate_profile_confirmations do |t| + t.references :profile, foreign_key: true, null: false, comment: 'sensitive=false' + t.timestamp :confirmed_at, null: false, comment: 'sensitive=false' + t.bigint :duplicate_profile_ids, null: false, array: true, comment: 'sensitive=false' + t.boolean :confirmed_all, comment: 'sensitive=false' + + t.timestamps comment: 'sensitive=false' + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 4e65a770b58..029329598cf 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[8.0].define(version: 2025_03_25_164321) do +ActiveRecord::Schema[8.0].define(version: 2025_04_16_181519) do # These are extensions that must be enabled in order to support this database enable_extension "citext" enable_extension "pg_catalog.plpgsql" @@ -208,6 +208,16 @@ t.index ["uuid"], name: "index_document_capture_sessions_on_uuid" end + create_table "duplicate_profile_confirmations", force: :cascade do |t| + t.bigint "profile_id", null: false, comment: "sensitive=false" + t.datetime "confirmed_at", precision: nil, null: false, comment: "sensitive=false" + t.bigint "duplicate_profile_ids", null: false, comment: "sensitive=false", array: true + t.boolean "confirmed_all", comment: "sensitive=false" + t.datetime "created_at", null: false, comment: "sensitive=false" + t.datetime "updated_at", null: false, comment: "sensitive=false" + t.index ["profile_id"], name: "index_duplicate_profile_confirmations_on_profile_id" + end + create_table "email_addresses", force: :cascade do |t| t.bigint "user_id", comment: "sensitive=false" t.string "confirmation_token", limit: 255, comment: "sensitive=true" @@ -680,6 +690,7 @@ end add_foreign_key "document_capture_sessions", "users" + add_foreign_key "duplicate_profile_confirmations", "profiles" add_foreign_key "iaa_gtcs", "partner_accounts" add_foreign_key "iaa_orders", "iaa_gtcs" add_foreign_key "in_person_enrollments", "profiles"