DEV: Add SMTP group ID to EmailLog (#13381)

Adds a new `smtp_group_id` column to `EmailLog` which is filled in if the mail `from_address` matches a group's `email_username`. This is for easier debugging, so we know which emails have been sent via group SMTP.
This commit is contained in:
Martin Brennan
2021-06-15 11:29:46 +10:00
committed by GitHub
parent 5f8f139ac9
commit 7fca7fb7ff
6 changed files with 73 additions and 19 deletions

View File

@@ -0,0 +1,7 @@
# frozen_string_literal: true
class AddSmtpGroupIdToEmailLog < ActiveRecord::Migration[6.1]
def change
add_column :email_logs, :smtp_group_id, :integer, null: true, index: true
end
end