mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 20:55:44 +02:00
Remove incidents count from bounced mails
This commit is contained in:
parent
6a93395fa4
commit
818869d249
4 changed files with 11 additions and 8 deletions
|
@ -7,11 +7,6 @@
|
||||||
<%= @bounced_mail_address.bounce_reason %>
|
<%= @bounced_mail_address.bounce_reason %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
|
||||||
<strong>Incidents:</strong>
|
|
||||||
<%= @bounced_mail_address.incidents %>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<strong>Bounced recipient JSON:</strong>
|
<strong>Bounced recipient JSON:</strong>
|
||||||
<pre><%= JSON.pretty_generate(@bounced_mail_address.recipient_json) %></pre>
|
<pre><%= JSON.pretty_generate(@bounced_mail_address.recipient_json) %></pre>
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
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
|
|
@ -483,7 +483,6 @@ CREATE TABLE public.bounced_mail_addresses (
|
||||||
id bigint NOT NULL,
|
id bigint NOT NULL,
|
||||||
email character varying NOT NULL,
|
email character varying NOT NULL,
|
||||||
bounce_reason character varying NOT NULL,
|
bounce_reason character varying NOT NULL,
|
||||||
incidents integer DEFAULT 1 NOT NULL,
|
|
||||||
response_json jsonb,
|
response_json jsonb,
|
||||||
created_at timestamp(6) without time zone NOT NULL,
|
created_at timestamp(6) without time zone NOT NULL,
|
||||||
updated_at timestamp(6) without time zone NOT NULL,
|
updated_at timestamp(6) without time zone NOT NULL,
|
||||||
|
@ -4958,6 +4957,7 @@ INSERT INTO "schema_migrations" (version) VALUES
|
||||||
('20200910085157'),
|
('20200910085157'),
|
||||||
('20200910102028'),
|
('20200910102028'),
|
||||||
('20200916125326'),
|
('20200916125326'),
|
||||||
('20200917104213');
|
('20200917104213'),
|
||||||
|
('20200921084356');
|
||||||
|
|
||||||
|
|
||||||
|
|
1
test/fixtures/bounced_mail_addresses.yml
vendored
1
test/fixtures/bounced_mail_addresses.yml
vendored
|
@ -1,7 +1,6 @@
|
||||||
one:
|
one:
|
||||||
email: bounced@registry.test
|
email: bounced@registry.test
|
||||||
bounce_reason: failed (5.1.1 smtp; 550 5.1.1 user unknown)
|
bounce_reason: failed (5.1.1 smtp; 550 5.1.1 user unknown)
|
||||||
incidents: 1
|
|
||||||
recipient_json: {
|
recipient_json: {
|
||||||
"action": "failed",
|
"action": "failed",
|
||||||
"status": "5.1.1",
|
"status": "5.1.1",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue