diff options
author | George Claghorn <george.claghorn@gmail.com> | 2019-01-17 12:58:12 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-17 12:58:12 -0600 |
commit | 3d7391cb76758c82c8ea7759b6dd8d4402bc2346 (patch) | |
tree | 3fa86d268c194afa7e58387731392dc05be14ee3 /actionmailbox/db | |
parent | 69c963c2e8ac56f4832e767c3c83091b9c6f24dd (diff) | |
parent | 5cd733a334846669d6435517f7d9913c4a9b1eb1 (diff) | |
download | rails-3d7391cb76758c82c8ea7759b6dd8d4402bc2346.tar.gz rails-3d7391cb76758c82c8ea7759b6dd8d4402bc2346.tar.bz2 rails-3d7391cb76758c82c8ea7759b6dd8d4402bc2346.zip |
Merge pull request #34962 from lifo/am-handle-duplicate-emails
Ensure Action Mailbox processes an email only once
Diffstat (limited to 'actionmailbox/db')
-rw-r--r-- | actionmailbox/db/migrate/20180917164000_create_action_mailbox_tables.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/actionmailbox/db/migrate/20180917164000_create_action_mailbox_tables.rb b/actionmailbox/db/migrate/20180917164000_create_action_mailbox_tables.rb index 8cf621d7e3..e697748f82 100644 --- a/actionmailbox/db/migrate/20180917164000_create_action_mailbox_tables.rb +++ b/actionmailbox/db/migrate/20180917164000_create_action_mailbox_tables.rb @@ -2,10 +2,13 @@ class CreateActionMailboxTables < ActiveRecord::Migration[6.0] def change create_table :action_mailbox_inbound_emails do |t| t.integer :status, default: 0, null: false - t.string :message_id + t.string :message_id, null: false + t.string :message_checksum, null: false t.datetime :created_at, precision: 6, null: false t.datetime :updated_at, precision: 6, null: false + + t.index [ :message_id, :message_checksum ], unique: true end end end |