Revert "Fix possible doubling of contact objects after race"

This commit is contained in:
Timo Võhmar 2020-06-30 15:39:48 +03:00 committed by GitHub
parent 98a209505d
commit 3be2c384a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 41 additions and 2238 deletions

View file

@ -1,25 +0,0 @@
class AddUniqueConstraintsToDomainObjects < ActiveRecord::Migration[6.0]
def up
execute <<-SQL
alter table domain_contacts
add constraint uniq_contact_of_type_per_domain unique (domain_id, type, contact_id);
SQL
execute <<-SQL
alter table nameservers
add constraint uniq_hostname_per_domain unique (domain_id, hostname);
SQL
end
def down
execute <<-SQL
alter table domain_contacts
drop constraint if exists uniq_contact_of_type_per_domain;
SQL
execute <<-SQL
alter table nameservers
drop constraint if exists uniq_hostname_per_domain;
SQL
end
end

File diff suppressed because it is too large Load diff