diff --git a/db/migrate/20220113220809_add_email_history_to_registrars.rb b/db/migrate/20220113220809_add_email_history_to_registrars.rb new file mode 100644 index 000000000..1f89353a1 --- /dev/null +++ b/db/migrate/20220113220809_add_email_history_to_registrars.rb @@ -0,0 +1,9 @@ +class AddEmailHistoryToRegistrars < ActiveRecord::Migration[6.1] + def change + add_column :registrars, :email_history, :string + + reversible do |dir| + dir.up { Registrar.update_all('email_history = email') } + end + end +end diff --git a/db/structure.sql b/db/structure.sql index 508617362..c7a592295 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -2417,7 +2417,8 @@ CREATE TABLE public.registrars ( iban character varying, settings jsonb DEFAULT '{}'::jsonb NOT NULL, legaldoc_optout boolean DEFAULT false NOT NULL, - legaldoc_optout_comment text + legaldoc_optout_comment text, + email_history character varying ); @@ -5273,6 +5274,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20211125184334'), ('20211126085139'), ('20220106123143'), -('20220113201642'); +('20220113201642'), +('20220113220809');