Remove registrant_verifications.domain_name database column

It is not used nor needed.
This commit is contained in:
Artur Beljajev 2019-12-06 20:47:57 +02:00
parent b4be9e7f00
commit 6fd172adbb
7 changed files with 8 additions and 7 deletions

View file

@ -29,7 +29,6 @@ module Admin
# steal token
token = @domain.registrant_verification_token
@registrant_verification = RegistrantVerification.new(domain_id: @domain.id,
domain_name: @domain.name,
verification_token: token)
end

View file

@ -26,7 +26,6 @@ module Admin
# steal token
token = @domain.registrant_verification_token
@registrant_verification = RegistrantVerification.new(domain_id: @domain.id,
domain_name: @domain.name,
verification_token: token)
end

View file

@ -16,7 +16,6 @@ class Registrant::DomainDeleteConfirmsController < RegistrantController
end
@registrant_verification = RegistrantVerification.new(domain_id: @domain.id,
domain_name: @domain.name,
verification_token: params[:token])
initiator = current_registrant_user ? current_registrant_user.username :

View file

@ -16,7 +16,6 @@ class Registrant::DomainUpdateConfirmsController < RegistrantController
end
@registrant_verification = RegistrantVerification.new(domain_id: @domain.id,
domain_name: @domain.name,
verification_token: params[:token])
initiator = current_registrant_user ? current_registrant_user.username :

View file

@ -11,7 +11,7 @@ class RegistrantVerification < ApplicationRecord
belongs_to :domain
validates :verification_token, :domain_name, :domain, :action, :action_type, presence: true
validates :verification_token, :domain, :action, :action_type, presence: true
def domain_registrant_change_confirm!(initiator)
self.action_type = DOMAIN_REGISTRANT_CHANGE

View file

@ -0,0 +1,5 @@
class RemoveRegistrantVerificationsDomainName < ActiveRecord::Migration[5.0]
def change
remove_column :registrant_verifications, :domain_name
end
end

View file

@ -1963,7 +1963,6 @@ ALTER SEQUENCE public.que_jobs_job_id_seq OWNED BY public.que_jobs.job_id;
CREATE TABLE public.registrant_verifications (
id integer NOT NULL,
domain_name character varying NOT NULL,
verification_token character varying NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
@ -4361,6 +4360,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20191007123000'),
('20191008024334'),
('20191024153351'),
('20191024160038');
('20191024160038'),
('20191206183853');