chore: "Channel::TwilioSms" to be unique on account_sid+phone_number (#4188)
"Twilio::IncomingMessageService" searches for the correct "Channel::TwilioSms" by account_sid+phone_number. If these values are duplicated then which record it finds is indeterminate and may alternate between queries. Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
@@ -257,7 +257,8 @@ ActiveRecord::Schema.define(version: 2022_04_28_101325) do
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.integer "medium", default: 0
|
||||
t.index ["account_id", "phone_number"], name: "index_channel_twilio_sms_on_account_id_and_phone_number", unique: true
|
||||
t.index ["account_sid", "phone_number"], name: "index_channel_twilio_sms_on_account_sid_and_phone_number", unique: true
|
||||
t.index ["phone_number"], name: "index_channel_twilio_sms_on_phone_number", unique: true
|
||||
end
|
||||
|
||||
create_table "channel_twitter_profiles", force: :cascade do |t|
|
||||
|
||||
Reference in New Issue
Block a user