Remove unused database tables

#756
This commit is contained in:
Artur Beljajev 2018-03-06 20:14:48 +02:00
parent 970cd7225c
commit ed0af5033e
19 changed files with 63 additions and 626 deletions

View file

@ -45,10 +45,6 @@ class Domain < ActiveRecord::Base
accepts_nested_attributes_for :nameservers, allow_destroy: true,
reject_if: proc { |attrs| attrs[:hostname].blank? }
has_many :domain_statuses, dependent: :destroy
accepts_nested_attributes_for :domain_statuses, allow_destroy: true,
reject_if: proc { |attrs| attrs[:value].blank? }
has_many :transfers, class_name: 'DomainTransfer', dependent: :destroy
has_many :dnskeys, dependent: :destroy
@ -172,10 +168,6 @@ class Domain < ActiveRecord::Base
attribute: 'contact_code_cache'
}
validates :domain_statuses, uniqueness_multi: {
attribute: 'value'
}
validates :dnskeys, uniqueness_multi: {
attribute: 'public_key'
}
@ -610,7 +602,6 @@ class Domain < ActiveRecord::Base
log[:tech_contacts] = tech_contact_ids
log[:nameservers] = nameserver_ids
log[:dnskeys] = dnskey_ids
log[:domain_statuses]= domain_status_ids
log[:legal_documents]= [legal_document_id]
log[:registrant] = [registrant_id]
log