add is first to completed submitters

This commit is contained in:
Pete Matsyburka
2025-11-21 11:27:28 +02:00
parent 1a68053f4e
commit 3102900776
3 changed files with 21 additions and 3 deletions
+5 -2
View File
@@ -6,6 +6,7 @@
#
# id :bigint not null, primary key
# completed_at :datetime not null
# is_first :boolean
# sms_count :integer not null
# source :string not null
# verification_method :string
@@ -18,8 +19,10 @@
#
# Indexes
#
# index_completed_submitters_on_account_id (account_id)
# index_completed_submitters_on_submitter_id (submitter_id) UNIQUE
# index_completed_submitters_on_account_id (account_id)
# index_completed_submitters_on_account_id_and_completed_at (account_id,completed_at) WHERE (is_first = true)
# index_completed_submitters_on_submission_id (submission_id) UNIQUE WHERE (is_first = true)
# index_completed_submitters_on_submitter_id (submitter_id) UNIQUE
#
class CompletedSubmitter < ApplicationRecord
belongs_to :submitter