Combine migrations, remove json objects from bounced mails

This commit is contained in:
Karl Erik Õunapuu 2020-09-21 13:34:34 +03:00
parent fae620c19d
commit 659cb7f4e6
No known key found for this signature in database
GPG key ID: C9DD647298A34764
4 changed files with 14 additions and 24 deletions

View file

@ -2,9 +2,12 @@ class CreateBouncedMailAddresses < ActiveRecord::Migration[6.0]
def change
create_table :bounced_mail_addresses do |t|
t.string :email, null: false
t.string :bounce_reason, null: false
t.integer :incidents, null: false, default: 1
t.jsonb :response_json
t.string :message_id, null: false
t.string :bounce_type, null: false
t.string :bounce_subtype, null: false
t.string :action, null: false
t.string :status, null: false
t.string :diagnostic, null: true
t.timestamps
end

View file

@ -1,5 +0,0 @@
class AddRecipientJsonToBouncedMailAddress < ActiveRecord::Migration[6.0]
def change
add_column :bounced_mail_addresses, :recipient_json, :jsonb, null: false
end
end

View file

@ -1,9 +0,0 @@
class RemoveIncidentsFromBouncedMailAddresses < ActiveRecord::Migration[6.0]
def up
remove_column :bounced_mail_addresses, :incidents
end
def down
add_column :bounced_mail_addresses, :incidents, :integer, null: false, default: 1
end
end