mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 04:37:30 +02:00
Combine migrations, remove json objects from bounced mails
This commit is contained in:
parent
fae620c19d
commit
659cb7f4e6
4 changed files with 14 additions and 24 deletions
|
@ -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
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
class AddRecipientJsonToBouncedMailAddress < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :bounced_mail_addresses, :recipient_json, :jsonb, null: false
|
||||
end
|
||||
end
|
|
@ -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
|
|
@ -482,11 +482,14 @@ ALTER SEQUENCE public.blocked_domains_id_seq OWNED BY public.blocked_domains.id;
|
|||
CREATE TABLE public.bounced_mail_addresses (
|
||||
id bigint NOT NULL,
|
||||
email character varying NOT NULL,
|
||||
bounce_reason character varying NOT NULL,
|
||||
response_json jsonb,
|
||||
message_id character varying NOT NULL,
|
||||
bounce_type character varying NOT NULL,
|
||||
bounce_subtype character varying NOT NULL,
|
||||
action character varying NOT NULL,
|
||||
status character varying NOT NULL,
|
||||
diagnostic character varying,
|
||||
created_at timestamp(6) without time zone NOT NULL,
|
||||
updated_at timestamp(6) without time zone NOT NULL,
|
||||
recipient_json jsonb NOT NULL
|
||||
updated_at timestamp(6) without time zone NOT NULL
|
||||
);
|
||||
|
||||
|
||||
|
@ -4956,8 +4959,6 @@ INSERT INTO "schema_migrations" (version) VALUES
|
|||
('20200908131554'),
|
||||
('20200910085157'),
|
||||
('20200910102028'),
|
||||
('20200916125326'),
|
||||
('20200917104213'),
|
||||
('20200921084356');
|
||||
('20200916125326');
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue