From 0f2a290d647997d9d8541a1bb9657dd308ad81dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Erik=20=C3=95unapuu?= Date: Fri, 24 Apr 2020 16:04:58 +0300 Subject: [PATCH] Add disputing logic for EPP --- app/controllers/admin/disputes_controller.rb | 11 +- app/controllers/epp/domains_controller.rb | 4 + .../domain_update_confirms_controller.rb | 6 + app/jobs/update_whois_record_job.rb | 19 +- app/models/dispute.rb | 88 ++- app/models/dns/domain_name.rb | 6 +- app/models/domain.rb | 8 +- app/models/epp/domain.rb | 22 +- app/models/setting.rb | 1 + config/app.yml | 2 + config/locales/admin/disputes.en.yml | 2 + config/locales/en.yml | 3 + config/routes.rb | 7 +- db/migrate/20200421093637_create_disputes.rb | 10 +- db/structure.sql | 746 +++++++++++------- lib/schemas/eis-1.0.xsd | 11 + lib/tasks/whois.rake | 5 + 17 files changed, 626 insertions(+), 325 deletions(-) diff --git a/app/controllers/admin/disputes_controller.rb b/app/controllers/admin/disputes_controller.rb index 8061eb890..8d26db614 100644 --- a/app/controllers/admin/disputes_controller.rb +++ b/app/controllers/admin/disputes_controller.rb @@ -28,9 +28,8 @@ module Admin # POST /admin/disputes def create @dispute = Dispute.new(dispute_params) - if @dispute.save - redirect_to @dispute, notice: 'Dispute was successfully created.' + redirect_to admin_disputes_url, notice: 'Dispute was successfully created.' else render :new end @@ -39,16 +38,16 @@ module Admin # PATCH/PUT /admin/disputes/1 def update if @dispute.update(dispute_params) - redirect_to @dispute, notice: 'Dispute was successfully updated.' + redirect_to admin_disputes_url, notice: 'Dispute was successfully updated.' else render :edit end end # DELETE /admin/disputes/1 - def destroy + def delete @dispute.destroy - redirect_to disputes_url, notice: 'Dispute was successfully destroyed.' + redirect_to admin_disputes_url, notice: 'Dispute was successfully destroyed.' end private @@ -60,7 +59,7 @@ module Admin # Only allow a trusted parameter "white list" through. def dispute_params - params.require(:dispute).permit(:domain_name, :password, :expires_at, :comment, :created_at) + params.require(:dispute).permit(:domain_name, :password, :starts_at, :comment) end end end diff --git a/app/controllers/epp/domains_controller.rb b/app/controllers/epp/domains_controller.rb index 9e4f6123a..2ab1f6d3a 100644 --- a/app/controllers/epp/domains_controller.rb +++ b/app/controllers/epp/domains_controller.rb @@ -104,6 +104,10 @@ module Epp authorize! :update, @domain, @password if @domain.update(params[:parsed_frame], current_user) + if @domain.disputed? + dispute = Dispute.active.find_by(domain_name: @domain.name) + dispute.close + end if @domain.epp_pending_update.present? render_epp_response '/epp/domains/success_pending' else diff --git a/app/controllers/registrant/domain_update_confirms_controller.rb b/app/controllers/registrant/domain_update_confirms_controller.rb index 61e623ddf..83b7ee953 100644 --- a/app/controllers/registrant/domain_update_confirms_controller.rb +++ b/app/controllers/registrant/domain_update_confirms_controller.rb @@ -31,6 +31,12 @@ class Registrant::DomainUpdateConfirmsController < RegistrantController end elsif params[:confirmed] if @registrant_verification.domain_registrant_change_confirm!("email link, #{initiator}") + if @domain.disputed? + Rails.logger.info 'Closing domain dispute via RegistrantConfirmation' + dispute = Dispute.active.find_by(domain_name: @domain.name) + dispute.close + end + flash[:notice] = t(:registrant_domain_verification_confirmed) redirect_to registrant_domain_update_confirm_path(@domain.id, confirmed: true) else diff --git a/app/jobs/update_whois_record_job.rb b/app/jobs/update_whois_record_job.rb index bee0e032c..cd35823e6 100644 --- a/app/jobs/update_whois_record_job.rb +++ b/app/jobs/update_whois_record_job.rb @@ -4,10 +4,11 @@ class UpdateWhoisRecordJob < Que::Job ::PaperTrail.whodunnit = "job - #{self.class.name} - #{type}" klass = case type - when 'reserved'then ReservedDomain - when 'blocked' then BlockedDomain - when 'domain' then Domain - end + when 'reserved' then ReservedDomain + when 'blocked' then BlockedDomain + when 'domain' then Domain + when 'disputed' then Dispute + end Array(names).each do |name| record = klass.find_by(name: name) @@ -19,8 +20,6 @@ class UpdateWhoisRecordJob < Que::Job end end - - def update_domain(domain) domain.whois_record ? domain.whois_record.save : domain.create_whois_record end @@ -33,6 +32,9 @@ class UpdateWhoisRecordJob < Que::Job update_reserved(record) end + def update_disputed(record) + update_reserved(record) + end # 1. deleting own # 2. trying to regenerate reserved in order domain is still in the list @@ -41,6 +43,7 @@ class UpdateWhoisRecordJob < Que::Job BlockedDomain.find_by(name: name).try(:generate_data) ReservedDomain.find_by(name: name).try(:generate_data) + Dispute.active.find_by(domain_name: name).try(:generate_data) end def delete_reserved(name) @@ -51,4 +54,8 @@ class UpdateWhoisRecordJob < Que::Job def delete_blocked(name) delete_reserved(name) end + + def delete_disputed(name) + delete_reserved(name) + end end diff --git a/app/models/dispute.rb b/app/models/dispute.rb index 874e46b30..450a92a2b 100644 --- a/app/models/dispute.rb +++ b/app/models/dispute.rb @@ -1,5 +1,89 @@ +# frozen_string_literal: true + class Dispute < ApplicationRecord - validates :domain_name, :password, :starts_at, :expires_at, :comment, - presence: true + validates :domain_name, :password, :starts_at, :expires_at, presence: true validates_uniqueness_of :domain_name, case_sensitive: true + before_validation :fill_empty_passwords + before_validation :set_expiry_date + validate :validate_domain_name + + with_options on: :admin do + validate :validate_start_date + end + before_save :set_expiry_date + before_save :sync_reserved_password + after_destroy :remove_data + + scope :expired, -> { where('expires_at < ?', Time.zone.today) } + scope :active, -> { where('expires_at > ? AND closed = 0', Time.zone.today) } + scope :closed, -> { where(closed: true) } + + alias_attribute :name, :domain_name + + def set_expiry_date + return if starts_at.blank? + + self.expires_at = starts_at + Setting.dispute_period_in_months.months + end + + def generate_password + self.password = SecureRandom.hex + end + + def generate_data + return if Domain.where(name: domain_name).any? + + wr = Whois::Record.find_or_initialize_by(name: domain_name) + wr.json = @json = generate_json # we need @json to bind to class + wr.save + end + + def close + self.closed = true + save! + end + + def generate_json + h = HashWithIndifferentAccess.new + h[:name] = domain_name + h[:status] = ['Disputed'] + h + end + + def remove_data + UpdateWhoisRecordJob.enqueue domain_name, 'disputed' + end + + def fill_empty_passwords + generate_password if password.blank? + end + + def sync_reserved_password + reserved_domain = ReservedDomain.find_by(name: domain_name) + generate_password if password.blank? + + unless reserved_domain.nil? + reserved_domain.password = password + reserved_domain.save! + end + + generate_data + end + + private + + def validate_start_date + return if starts_at.nil? + + errors.add(:starts_at, :past) if starts_at.past? + end + + def validate_domain_name + return unless domain_name + + zone = domain_name.split('.').last + supported_zone = DNS::Zone.origins.include?(zone) + + errors.add(:domain_name, :unsupported_zone) unless supported_zone + end end diff --git a/app/models/dns/domain_name.rb b/app/models/dns/domain_name.rb index e4dd24fa5..c1af4d5e7 100644 --- a/app/models/dns/domain_name.rb +++ b/app/models/dns/domain_name.rb @@ -68,6 +68,10 @@ module DNS ReservedDomain.where(name: name).any? end + def disputed? + Dispute.active.where(domain_name: name).any? + end + def auctionable? !not_auctionable? end @@ -81,7 +85,7 @@ module DNS attr_reader :name def not_auctionable? - blocked? || reserved? + blocked? || reserved? || disputed? end def zone_with_same_origin? diff --git a/app/models/domain.rb b/app/models/domain.rb index f21317b70..011d02ec7 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -90,6 +90,7 @@ class Domain < ApplicationRecord validates :transfer_code, presence: true validate :validate_reservation + def validate_reservation return if persisted? || !in_reserved_list? @@ -99,6 +100,7 @@ class Domain < ApplicationRecord end return if ReservedDomain.pw_for(name) == reserved_pw + errors.add(:base, :invalid_auth_information_reserved) end @@ -170,7 +172,7 @@ class Domain < ApplicationRecord end attr_accessor :registrant_typeahead, :update_me, - :epp_pending_update, :epp_pending_delete, :reserved_pw + :epp_pending_update, :epp_pending_delete, :reserved_pw, :disputed_pw self.ignored_columns = %w[legacy_id legacy_registrar_id legacy_registrant_id] @@ -275,6 +277,10 @@ class Domain < ApplicationRecord @in_reserved_list ||= ReservedDomain.by_domain(name).any? end + def disputed? + Dispute.active.where(domain_name: name).any? + end + def pending_transfer transfers.find_by(status: DomainTransfer::PENDING) end diff --git a/app/models/epp/domain.rb b/app/models/epp/domain.rb index dc80b2e40..31fee711d 100644 --- a/app/models/epp/domain.rb +++ b/app/models/epp/domain.rb @@ -58,7 +58,8 @@ class Epp::Domain < Domain '2003' => [ # Required parameter missing [:registrant, :blank], [:registrar, :blank], - [:base, :required_parameter_missing_reserved] + [:base, :required_parameter_missing_reserved], + [:base, :required_parameter_missing_disputed] ], '2004' => [ # Parameter value range error [:dnskeys, :out_of_range, @@ -88,7 +89,8 @@ class Epp::Domain < Domain [:transfer_code, :wrong_pw] ], '2202' => [ - [:base, :invalid_auth_information_reserved] + [:base, :invalid_auth_information_reserved], + [:base, :invalid_auth_information_disputed] ], '2302' => [ # Object exists [:name_dirty, :taken, { value: { obj: 'name', val: name_dirty } }], @@ -154,6 +156,7 @@ class Epp::Domain < Domain at[:period_unit] = Epp::Domain.parse_period_unit_from_frame(frame) || 'y' at[:reserved_pw] = frame.css('reserved > pw').text + at[:disputed_pw] = frame.css('disputed > pw').text # at[:statuses] = domain_statuses_attrs(frame, action) at[:nameservers_attributes] = nameservers_attrs(frame, action) @@ -475,6 +478,16 @@ class Epp::Domain < Domain same_registrant_as_current = (registrant.code == frame.css('registrant').text) + if !same_registrant_as_current && disputed? + disputed_pw = frame.css('disputed > pw').text + if disputed_pw.blank? + add_epp_error('2304', nil, nil, 'Required parameter missing; disputed pw element required for dispute domains') + else + dispute = Dispute.active.find_by(domain_name: name, password: disputed_pw) + add_epp_error('2202', nil, nil, 'Invalid authorization information; invalid disputed>pw value') if dispute.nil? + end + end + if !same_registrant_as_current && errors.empty? && verify && Setting.request_confrimation_on_registrant_change_enabled && frame.css('registrant').present? && @@ -706,6 +719,11 @@ class Epp::Domain < Domain def can_be_deleted? + if disputed? + errors.add(:base, :domain_status_prohibits_operation) + return false + end + begin errors.add(:base, :domain_status_prohibits_operation) return false diff --git a/app/models/setting.rb b/app/models/setting.rb index 64a20c34f..9f00055a3 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -46,6 +46,7 @@ class Setting < RailsSettings::Base expire_warning_period redemption_grace_period expire_pending_confirmation + dispute_period_in_months ] end diff --git a/config/app.yml b/config/app.yml index 763da3373..f11189111 100644 --- a/config/app.yml +++ b/config/app.yml @@ -44,6 +44,8 @@ defaults: &defaults registrar_ip_whitelist_enabled: false api_ip_whitelist_enabled: false + dispute_period_in_months: 36 + registry_juridical_name: "Eesti Interneti SA" registry_reg_no: "90010019" registry_email: "info@internet.ee" diff --git a/config/locales/admin/disputes.en.yml b/config/locales/admin/disputes.en.yml index 4073d6e61..ba5b79099 100644 --- a/config/locales/admin/disputes.en.yml +++ b/config/locales/admin/disputes.en.yml @@ -8,3 +8,5 @@ en: form: password_hint: Generated automatically if left blank + optional: Not required by default + in_future: Must be at least today / in future diff --git a/config/locales/en.yml b/config/locales/en.yml index f1d2ad817..a825b1dc0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -24,6 +24,8 @@ en: key_data_not_allowed: 'keyData object is not allowed' required_parameter_missing_reserved: 'Required parameter missing; reserved>pw element required for reserved domains' invalid_auth_information_reserved: 'Invalid authorization information; invalid reserved>pw value' + required_parameter_missing_disputed: 'Required parameter missing; disputed pw element required for dispute domains' + invalid_auth_information_disputed: 'Invalid authorization information; invalid disputed>pw value' domain_name_blocked: 'Data management policy violation: Domain name is blocked [name]' name_dirty: invalid: 'Domain name is invalid' @@ -631,6 +633,7 @@ en: add_blocked_domain: 'Add domain to blocked list' add_disputed_domain: 'Add domain to disputed list' edit_pw: 'Edit Pw' + edit_dispute: 'Edit dispute' optional: 'Optional' test_registrar: "Test registrar" verified_confirm: 'Verified status is for cases when current registrant is the one applying for the update. Legal document signed by the registrant is required. Are you sure this update is properly verified with the registrant?' diff --git a/config/routes.rb b/config/routes.rb index 0d2093d36..4ce06b651 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,7 +1,6 @@ require_dependency 'epp_constraint' Rails.application.routes.draw do - resources :disputes # https://github.com/internetee/epp_proxy#translation-of-epp-calls namespace :epp do constraints(EppConstraint.new(:session)) do @@ -259,7 +258,11 @@ Rails.application.routes.draw do get 'delete' end end - resources :disputes + resources :disputes do + member do + get 'delete' + end + end resources :registrars do resources :api_users, except: %i[index] diff --git a/db/migrate/20200421093637_create_disputes.rb b/db/migrate/20200421093637_create_disputes.rb index 48cdfae59..b934d3297 100644 --- a/db/migrate/20200421093637_create_disputes.rb +++ b/db/migrate/20200421093637_create_disputes.rb @@ -1,12 +1,12 @@ class CreateDisputes < ActiveRecord::Migration[5.2] def change create_table :disputes do |t| - t.string :domain_name - t.string :password - t.date :expires_at - t.date :starts_at + t.string :domain_name, null: false + t.string :password, null: false + t.date :expires_at, null: false + t.date :starts_at, null: false t.text :comment - t.datetime :created_at + t.boolean :closed, null: false, default: false t.timestamps end diff --git a/db/structure.sql b/db/structure.sql index 604238d4c..2e8294d41 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1,28 +1,19 @@ --- --- PostgreSQL database dump --- - SET statement_timeout = 0; SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; +SET row_security = off; -- --- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - +-- Name: audit; Type: SCHEMA; Schema: -; Owner: - -- -CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; - - --- --- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: - --- - -COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; +CREATE SCHEMA audit; -- @@ -191,12 +182,75 @@ CREATE FUNCTION public.generate_zonefile(i_origin character varying) RETURNS tex $_$; +-- +-- Name: process_contact_audit(); Type: FUNCTION; Schema: public; Owner: - +-- + +CREATE FUNCTION public.process_contact_audit() RETURNS trigger + LANGUAGE plpgsql + AS $$ + BEGIN + IF (TG_OP = 'INSERT') THEN + INSERT INTO audit.contacts + (object_id, action, recorded_at, old_value, new_value) + VALUES (NEW.id, 'INSERT', now(), '{}', to_json(NEW)::jsonb); + RETURN NEW; + ELSEIF (TG_OP = 'UPDATE') THEN + INSERT INTO audit.contacts + (object_id, action, recorded_at, old_value, new_value) + VALUES (NEW.id, 'UPDATE', now(), to_json(OLD)::jsonb, to_json(NEW)::jsonb); + RETURN NEW; + ELSEIF (TG_OP = 'DELETE') THEN + INSERT INTO audit.contacts + (object_id, action, recorded_at, old_value, new_value) + VALUES (OLD.id, 'DELETE', now(), to_json(OLD)::jsonb, '{}'); + RETURN OLD; + END IF; + RETURN NULL; + END +$$; + + SET default_tablespace = ''; SET default_with_oids = false; -- --- Name: account_activities; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: contacts; Type: TABLE; Schema: audit; Owner: - +-- + +CREATE TABLE audit.contacts ( + id integer NOT NULL, + object_id bigint, + action text NOT NULL, + recorded_at timestamp without time zone, + old_value jsonb, + new_value jsonb, + CONSTRAINT contacts_action_check CHECK ((action = ANY (ARRAY['INSERT'::text, 'UPDATE'::text, 'DELETE'::text, 'TRUNCATE'::text]))) +); + + +-- +-- Name: contacts_id_seq; Type: SEQUENCE; Schema: audit; Owner: - +-- + +CREATE SEQUENCE audit.contacts_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: contacts_id_seq; Type: SEQUENCE OWNED BY; Schema: audit; Owner: - +-- + +ALTER SEQUENCE audit.contacts_id_seq OWNED BY audit.contacts.id; + + +-- +-- Name: account_activities; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.account_activities ( @@ -236,7 +290,7 @@ ALTER SEQUENCE public.account_activities_id_seq OWNED BY public.account_activiti -- --- Name: accounts; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: accounts; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.accounts ( @@ -272,7 +326,7 @@ ALTER SEQUENCE public.accounts_id_seq OWNED BY public.accounts.id; -- --- Name: actions; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: actions; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.actions ( @@ -304,7 +358,7 @@ ALTER SEQUENCE public.actions_id_seq OWNED BY public.actions.id; -- --- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.ar_internal_metadata ( @@ -316,7 +370,7 @@ CREATE TABLE public.ar_internal_metadata ( -- --- Name: auctions; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: auctions; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.auctions ( @@ -349,7 +403,7 @@ ALTER SEQUENCE public.auctions_id_seq OWNED BY public.auctions.id; -- --- Name: bank_statements; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: bank_statements; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.bank_statements ( @@ -385,7 +439,7 @@ ALTER SEQUENCE public.bank_statements_id_seq OWNED BY public.bank_statements.id; -- --- Name: bank_transactions; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: bank_transactions; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.bank_transactions ( @@ -429,7 +483,7 @@ ALTER SEQUENCE public.bank_transactions_id_seq OWNED BY public.bank_transactions -- --- Name: blocked_domains; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: blocked_domains; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blocked_domains ( @@ -462,7 +516,7 @@ ALTER SEQUENCE public.blocked_domains_id_seq OWNED BY public.blocked_domains.id; -- --- Name: certificates; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: certificates; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.certificates ( @@ -500,7 +554,7 @@ ALTER SEQUENCE public.certificates_id_seq OWNED BY public.certificates.id; -- --- Name: contacts; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: contacts; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.contacts ( @@ -558,7 +612,7 @@ ALTER SEQUENCE public.contacts_id_seq OWNED BY public.contacts.id; -- --- Name: directos; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: directos; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.directos ( @@ -593,7 +647,43 @@ ALTER SEQUENCE public.directos_id_seq OWNED BY public.directos.id; -- --- Name: dnskeys; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: disputes; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.disputes ( + id bigint NOT NULL, + domain_name character varying NOT NULL, + password character varying NOT NULL, + expires_at date NOT NULL, + starts_at date NOT NULL, + comment text, + closed boolean DEFAULT false NOT NULL, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +-- +-- Name: disputes_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.disputes_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: disputes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.disputes_id_seq OWNED BY public.disputes.id; + + +-- +-- Name: dnskeys; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.dnskeys ( @@ -634,7 +724,7 @@ ALTER SEQUENCE public.dnskeys_id_seq OWNED BY public.dnskeys.id; -- --- Name: domain_contacts; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: domain_contacts; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.domain_contacts ( @@ -672,7 +762,7 @@ ALTER SEQUENCE public.domain_contacts_id_seq OWNED BY public.domain_contacts.id; -- --- Name: domain_transfers; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: domain_transfers; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.domain_transfers ( @@ -709,7 +799,7 @@ ALTER SEQUENCE public.domain_transfers_id_seq OWNED BY public.domain_transfers.i -- --- Name: domains; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: domains; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.domains ( @@ -769,7 +859,7 @@ ALTER SEQUENCE public.domains_id_seq OWNED BY public.domains.id; -- --- Name: epp_sessions; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: epp_sessions; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.epp_sessions ( @@ -801,7 +891,7 @@ ALTER SEQUENCE public.epp_sessions_id_seq OWNED BY public.epp_sessions.id; -- --- Name: invoice_items; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: invoice_items; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.invoice_items ( @@ -839,7 +929,7 @@ ALTER SEQUENCE public.invoice_items_id_seq OWNED BY public.invoice_items.id; -- --- Name: invoices; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: invoices; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.invoices ( @@ -910,7 +1000,7 @@ ALTER SEQUENCE public.invoices_id_seq OWNED BY public.invoices.id; -- --- Name: legal_documents; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: legal_documents; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.legal_documents ( @@ -945,7 +1035,7 @@ ALTER SEQUENCE public.legal_documents_id_seq OWNED BY public.legal_documents.id; -- --- Name: log_account_activities; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_account_activities; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_account_activities ( @@ -983,7 +1073,7 @@ ALTER SEQUENCE public.log_account_activities_id_seq OWNED BY public.log_account_ -- --- Name: log_accounts; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_accounts; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_accounts ( @@ -1021,7 +1111,7 @@ ALTER SEQUENCE public.log_accounts_id_seq OWNED BY public.log_accounts.id; -- --- Name: log_actions; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_actions; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_actions ( @@ -1059,7 +1149,7 @@ ALTER SEQUENCE public.log_actions_id_seq OWNED BY public.log_actions.id; -- --- Name: log_bank_statements; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_bank_statements; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_bank_statements ( @@ -1097,7 +1187,7 @@ ALTER SEQUENCE public.log_bank_statements_id_seq OWNED BY public.log_bank_statem -- --- Name: log_bank_transactions; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_bank_transactions; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_bank_transactions ( @@ -1135,7 +1225,7 @@ ALTER SEQUENCE public.log_bank_transactions_id_seq OWNED BY public.log_bank_tran -- --- Name: log_blocked_domains; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_blocked_domains; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_blocked_domains ( @@ -1173,7 +1263,7 @@ ALTER SEQUENCE public.log_blocked_domains_id_seq OWNED BY public.log_blocked_dom -- --- Name: log_certificates; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_certificates; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_certificates ( @@ -1211,7 +1301,7 @@ ALTER SEQUENCE public.log_certificates_id_seq OWNED BY public.log_certificates.i -- --- Name: log_contacts; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_contacts; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_contacts ( @@ -1250,7 +1340,7 @@ ALTER SEQUENCE public.log_contacts_id_seq OWNED BY public.log_contacts.id; -- --- Name: log_dnskeys; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_dnskeys; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_dnskeys ( @@ -1288,7 +1378,7 @@ ALTER SEQUENCE public.log_dnskeys_id_seq OWNED BY public.log_dnskeys.id; -- --- Name: log_domain_contacts; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_domain_contacts; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_domain_contacts ( @@ -1326,7 +1416,7 @@ ALTER SEQUENCE public.log_domain_contacts_id_seq OWNED BY public.log_domain_cont -- --- Name: log_domains; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_domains; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_domains ( @@ -1364,7 +1454,7 @@ ALTER SEQUENCE public.log_domains_id_seq OWNED BY public.log_domains.id; -- --- Name: log_invoice_items; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_invoice_items; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_invoice_items ( @@ -1402,7 +1492,7 @@ ALTER SEQUENCE public.log_invoice_items_id_seq OWNED BY public.log_invoice_items -- --- Name: log_invoices; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_invoices; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_invoices ( @@ -1440,7 +1530,7 @@ ALTER SEQUENCE public.log_invoices_id_seq OWNED BY public.log_invoices.id; -- --- Name: log_nameservers; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_nameservers; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_nameservers ( @@ -1478,7 +1568,7 @@ ALTER SEQUENCE public.log_nameservers_id_seq OWNED BY public.log_nameservers.id; -- --- Name: log_notifications; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_notifications; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_notifications ( @@ -1516,7 +1606,7 @@ ALTER SEQUENCE public.log_notifications_id_seq OWNED BY public.log_notifications -- --- Name: log_payment_orders; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_payment_orders; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_payment_orders ( @@ -1554,7 +1644,7 @@ ALTER SEQUENCE public.log_payment_orders_id_seq OWNED BY public.log_payment_orde -- --- Name: log_registrant_verifications; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_registrant_verifications; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_registrant_verifications ( @@ -1591,7 +1681,7 @@ ALTER SEQUENCE public.log_registrant_verifications_id_seq OWNED BY public.log_re -- --- Name: log_registrars; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_registrars; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_registrars ( @@ -1629,7 +1719,7 @@ ALTER SEQUENCE public.log_registrars_id_seq OWNED BY public.log_registrars.id; -- --- Name: log_reserved_domains; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_reserved_domains; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_reserved_domains ( @@ -1667,7 +1757,7 @@ ALTER SEQUENCE public.log_reserved_domains_id_seq OWNED BY public.log_reserved_d -- --- Name: log_settings; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_settings; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_settings ( @@ -1705,7 +1795,7 @@ ALTER SEQUENCE public.log_settings_id_seq OWNED BY public.log_settings.id; -- --- Name: log_users; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_users; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_users ( @@ -1743,7 +1833,7 @@ ALTER SEQUENCE public.log_users_id_seq OWNED BY public.log_users.id; -- --- Name: log_white_ips; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_white_ips; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.log_white_ips ( @@ -1781,7 +1871,7 @@ ALTER SEQUENCE public.log_white_ips_id_seq OWNED BY public.log_white_ips.id; -- --- Name: nameservers; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: nameservers; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.nameservers ( @@ -1819,7 +1909,7 @@ ALTER SEQUENCE public.nameservers_id_seq OWNED BY public.nameservers.id; -- --- Name: notifications; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: notifications; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.notifications ( @@ -1857,7 +1947,7 @@ ALTER SEQUENCE public.notifications_id_seq OWNED BY public.notifications.id; -- --- Name: payment_orders; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: payment_orders; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.payment_orders ( @@ -1894,7 +1984,7 @@ ALTER SEQUENCE public.payment_orders_id_seq OWNED BY public.payment_orders.id; -- --- Name: prices; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: prices; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.prices ( @@ -1932,7 +2022,7 @@ ALTER SEQUENCE public.prices_id_seq OWNED BY public.prices.id; -- --- Name: que_jobs; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: que_jobs; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.que_jobs ( @@ -1974,7 +2064,7 @@ ALTER SEQUENCE public.que_jobs_job_id_seq OWNED BY public.que_jobs.job_id; -- --- Name: registrant_verifications; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: registrant_verifications; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.registrant_verifications ( @@ -2010,7 +2100,7 @@ ALTER SEQUENCE public.registrant_verifications_id_seq OWNED BY public.registrant -- --- Name: registrars; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: registrars; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.registrars ( @@ -2063,7 +2153,7 @@ ALTER SEQUENCE public.registrars_id_seq OWNED BY public.registrars.id; -- --- Name: reserved_domains; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: reserved_domains; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.reserved_domains ( @@ -2098,7 +2188,7 @@ ALTER SEQUENCE public.reserved_domains_id_seq OWNED BY public.reserved_domains.i -- --- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.schema_migrations ( @@ -2107,7 +2197,7 @@ CREATE TABLE public.schema_migrations ( -- --- Name: settings; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: settings; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.settings ( @@ -2143,7 +2233,7 @@ ALTER SEQUENCE public.settings_id_seq OWNED BY public.settings.id; -- --- Name: users; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: users; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.users ( @@ -2195,7 +2285,7 @@ ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id; -- --- Name: versions; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: versions; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.versions ( @@ -2230,7 +2320,7 @@ ALTER SEQUENCE public.versions_id_seq OWNED BY public.versions.id; -- --- Name: white_ips; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: white_ips; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.white_ips ( @@ -2266,7 +2356,7 @@ ALTER SEQUENCE public.white_ips_id_seq OWNED BY public.white_ips.id; -- --- Name: whois_records; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: whois_records; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.whois_records ( @@ -2301,7 +2391,7 @@ ALTER SEQUENCE public.whois_records_id_seq OWNED BY public.whois_records.id; -- --- Name: zones; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: zones; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.zones ( @@ -2344,385 +2434,407 @@ ALTER SEQUENCE public.zones_id_seq OWNED BY public.zones.id; -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: contacts id; Type: DEFAULT; Schema: audit; Owner: - +-- + +ALTER TABLE ONLY audit.contacts ALTER COLUMN id SET DEFAULT nextval('audit.contacts_id_seq'::regclass); + + +-- +-- Name: account_activities id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.account_activities ALTER COLUMN id SET DEFAULT nextval('public.account_activities_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: accounts id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.accounts ALTER COLUMN id SET DEFAULT nextval('public.accounts_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: actions id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.actions ALTER COLUMN id SET DEFAULT nextval('public.actions_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: auctions id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.auctions ALTER COLUMN id SET DEFAULT nextval('public.auctions_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: bank_statements id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.bank_statements ALTER COLUMN id SET DEFAULT nextval('public.bank_statements_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: bank_transactions id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.bank_transactions ALTER COLUMN id SET DEFAULT nextval('public.bank_transactions_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: blocked_domains id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.blocked_domains ALTER COLUMN id SET DEFAULT nextval('public.blocked_domains_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: certificates id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.certificates ALTER COLUMN id SET DEFAULT nextval('public.certificates_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: contacts id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.contacts ALTER COLUMN id SET DEFAULT nextval('public.contacts_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: directos id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.directos ALTER COLUMN id SET DEFAULT nextval('public.directos_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: disputes id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.disputes ALTER COLUMN id SET DEFAULT nextval('public.disputes_id_seq'::regclass); + + +-- +-- Name: dnskeys id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.dnskeys ALTER COLUMN id SET DEFAULT nextval('public.dnskeys_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: domain_contacts id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.domain_contacts ALTER COLUMN id SET DEFAULT nextval('public.domain_contacts_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: domain_transfers id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.domain_transfers ALTER COLUMN id SET DEFAULT nextval('public.domain_transfers_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: domains id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.domains ALTER COLUMN id SET DEFAULT nextval('public.domains_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: epp_sessions id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.epp_sessions ALTER COLUMN id SET DEFAULT nextval('public.epp_sessions_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: invoice_items id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.invoice_items ALTER COLUMN id SET DEFAULT nextval('public.invoice_items_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: invoices id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.invoices ALTER COLUMN id SET DEFAULT nextval('public.invoices_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: legal_documents id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.legal_documents ALTER COLUMN id SET DEFAULT nextval('public.legal_documents_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_account_activities id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_account_activities ALTER COLUMN id SET DEFAULT nextval('public.log_account_activities_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_accounts id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_accounts ALTER COLUMN id SET DEFAULT nextval('public.log_accounts_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_actions id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_actions ALTER COLUMN id SET DEFAULT nextval('public.log_actions_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_bank_statements id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_bank_statements ALTER COLUMN id SET DEFAULT nextval('public.log_bank_statements_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_bank_transactions id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_bank_transactions ALTER COLUMN id SET DEFAULT nextval('public.log_bank_transactions_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_blocked_domains id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_blocked_domains ALTER COLUMN id SET DEFAULT nextval('public.log_blocked_domains_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_certificates id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_certificates ALTER COLUMN id SET DEFAULT nextval('public.log_certificates_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_contacts id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_contacts ALTER COLUMN id SET DEFAULT nextval('public.log_contacts_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_dnskeys id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_dnskeys ALTER COLUMN id SET DEFAULT nextval('public.log_dnskeys_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_domain_contacts id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_domain_contacts ALTER COLUMN id SET DEFAULT nextval('public.log_domain_contacts_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_domains id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_domains ALTER COLUMN id SET DEFAULT nextval('public.log_domains_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_invoice_items id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_invoice_items ALTER COLUMN id SET DEFAULT nextval('public.log_invoice_items_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_invoices id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_invoices ALTER COLUMN id SET DEFAULT nextval('public.log_invoices_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_nameservers id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_nameservers ALTER COLUMN id SET DEFAULT nextval('public.log_nameservers_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_notifications id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_notifications ALTER COLUMN id SET DEFAULT nextval('public.log_notifications_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_payment_orders id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_payment_orders ALTER COLUMN id SET DEFAULT nextval('public.log_payment_orders_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_registrant_verifications id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_registrant_verifications ALTER COLUMN id SET DEFAULT nextval('public.log_registrant_verifications_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_registrars id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_registrars ALTER COLUMN id SET DEFAULT nextval('public.log_registrars_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_reserved_domains id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_reserved_domains ALTER COLUMN id SET DEFAULT nextval('public.log_reserved_domains_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_settings id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_settings ALTER COLUMN id SET DEFAULT nextval('public.log_settings_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_users id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_users ALTER COLUMN id SET DEFAULT nextval('public.log_users_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: log_white_ips id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_white_ips ALTER COLUMN id SET DEFAULT nextval('public.log_white_ips_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: nameservers id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.nameservers ALTER COLUMN id SET DEFAULT nextval('public.nameservers_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: notifications id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.notifications ALTER COLUMN id SET DEFAULT nextval('public.notifications_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: payment_orders id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.payment_orders ALTER COLUMN id SET DEFAULT nextval('public.payment_orders_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: prices id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prices ALTER COLUMN id SET DEFAULT nextval('public.prices_id_seq'::regclass); -- --- Name: job_id; Type: DEFAULT; Schema: public; Owner: - +-- Name: que_jobs job_id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.que_jobs ALTER COLUMN job_id SET DEFAULT nextval('public.que_jobs_job_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: registrant_verifications id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registrant_verifications ALTER COLUMN id SET DEFAULT nextval('public.registrant_verifications_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: registrars id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registrars ALTER COLUMN id SET DEFAULT nextval('public.registrars_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: reserved_domains id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.reserved_domains ALTER COLUMN id SET DEFAULT nextval('public.reserved_domains_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: settings id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.settings ALTER COLUMN id SET DEFAULT nextval('public.settings_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: users id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: versions id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.versions ALTER COLUMN id SET DEFAULT nextval('public.versions_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: white_ips id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.white_ips ALTER COLUMN id SET DEFAULT nextval('public.white_ips_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: whois_records id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.whois_records ALTER COLUMN id SET DEFAULT nextval('public.whois_records_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: zones id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.zones ALTER COLUMN id SET DEFAULT nextval('public.zones_id_seq'::regclass); -- --- Name: account_activities_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: contacts contacts_pkey; Type: CONSTRAINT; Schema: audit; Owner: - +-- + +ALTER TABLE ONLY audit.contacts + ADD CONSTRAINT contacts_pkey PRIMARY KEY (id); + + +-- +-- Name: account_activities account_activities_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.account_activities @@ -2730,7 +2842,7 @@ ALTER TABLE ONLY public.account_activities -- --- Name: accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: accounts accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.accounts @@ -2738,7 +2850,7 @@ ALTER TABLE ONLY public.accounts -- --- Name: actions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: actions actions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.actions @@ -2746,7 +2858,7 @@ ALTER TABLE ONLY public.actions -- --- Name: ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.ar_internal_metadata @@ -2754,7 +2866,7 @@ ALTER TABLE ONLY public.ar_internal_metadata -- --- Name: auctions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: auctions auctions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.auctions @@ -2762,7 +2874,7 @@ ALTER TABLE ONLY public.auctions -- --- Name: bank_statements_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: bank_statements bank_statements_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.bank_statements @@ -2770,7 +2882,7 @@ ALTER TABLE ONLY public.bank_statements -- --- Name: bank_transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: bank_transactions bank_transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.bank_transactions @@ -2778,7 +2890,7 @@ ALTER TABLE ONLY public.bank_transactions -- --- Name: blocked_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: blocked_domains blocked_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.blocked_domains @@ -2786,7 +2898,7 @@ ALTER TABLE ONLY public.blocked_domains -- --- Name: certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: certificates certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.certificates @@ -2794,7 +2906,7 @@ ALTER TABLE ONLY public.certificates -- --- Name: contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: contacts contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.contacts @@ -2802,7 +2914,7 @@ ALTER TABLE ONLY public.contacts -- --- Name: directos_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: directos directos_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.directos @@ -2810,7 +2922,15 @@ ALTER TABLE ONLY public.directos -- --- Name: dnskeys_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: disputes disputes_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.disputes + ADD CONSTRAINT disputes_pkey PRIMARY KEY (id); + + +-- +-- Name: dnskeys dnskeys_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.dnskeys @@ -2818,7 +2938,7 @@ ALTER TABLE ONLY public.dnskeys -- --- Name: domain_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: domain_contacts domain_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.domain_contacts @@ -2826,7 +2946,7 @@ ALTER TABLE ONLY public.domain_contacts -- --- Name: domain_transfers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: domain_transfers domain_transfers_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.domain_transfers @@ -2834,7 +2954,7 @@ ALTER TABLE ONLY public.domain_transfers -- --- Name: domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: domains domains_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.domains @@ -2842,7 +2962,7 @@ ALTER TABLE ONLY public.domains -- --- Name: epp_sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: epp_sessions epp_sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.epp_sessions @@ -2850,7 +2970,7 @@ ALTER TABLE ONLY public.epp_sessions -- --- Name: invoice_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: invoice_items invoice_items_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.invoice_items @@ -2858,7 +2978,7 @@ ALTER TABLE ONLY public.invoice_items -- --- Name: invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: invoices invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.invoices @@ -2866,7 +2986,7 @@ ALTER TABLE ONLY public.invoices -- --- Name: legal_documents_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: legal_documents legal_documents_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.legal_documents @@ -2874,7 +2994,7 @@ ALTER TABLE ONLY public.legal_documents -- --- Name: log_account_activities_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_account_activities log_account_activities_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_account_activities @@ -2882,7 +3002,7 @@ ALTER TABLE ONLY public.log_account_activities -- --- Name: log_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_accounts log_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_accounts @@ -2890,7 +3010,7 @@ ALTER TABLE ONLY public.log_accounts -- --- Name: log_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_actions log_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_actions @@ -2898,7 +3018,7 @@ ALTER TABLE ONLY public.log_actions -- --- Name: log_bank_statements_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_bank_statements log_bank_statements_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_bank_statements @@ -2906,7 +3026,7 @@ ALTER TABLE ONLY public.log_bank_statements -- --- Name: log_bank_transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_bank_transactions log_bank_transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_bank_transactions @@ -2914,7 +3034,7 @@ ALTER TABLE ONLY public.log_bank_transactions -- --- Name: log_blocked_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_blocked_domains log_blocked_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_blocked_domains @@ -2922,7 +3042,7 @@ ALTER TABLE ONLY public.log_blocked_domains -- --- Name: log_certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_certificates log_certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_certificates @@ -2930,7 +3050,7 @@ ALTER TABLE ONLY public.log_certificates -- --- Name: log_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_contacts log_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_contacts @@ -2938,7 +3058,7 @@ ALTER TABLE ONLY public.log_contacts -- --- Name: log_dnskeys_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_dnskeys log_dnskeys_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_dnskeys @@ -2946,7 +3066,7 @@ ALTER TABLE ONLY public.log_dnskeys -- --- Name: log_domain_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_domain_contacts log_domain_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_domain_contacts @@ -2954,7 +3074,7 @@ ALTER TABLE ONLY public.log_domain_contacts -- --- Name: log_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_domains log_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_domains @@ -2962,7 +3082,7 @@ ALTER TABLE ONLY public.log_domains -- --- Name: log_invoice_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_invoice_items log_invoice_items_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_invoice_items @@ -2970,7 +3090,7 @@ ALTER TABLE ONLY public.log_invoice_items -- --- Name: log_invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_invoices log_invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_invoices @@ -2978,7 +3098,7 @@ ALTER TABLE ONLY public.log_invoices -- --- Name: log_nameservers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_nameservers log_nameservers_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_nameservers @@ -2986,7 +3106,7 @@ ALTER TABLE ONLY public.log_nameservers -- --- Name: log_notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_notifications log_notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_notifications @@ -2994,7 +3114,7 @@ ALTER TABLE ONLY public.log_notifications -- --- Name: log_payment_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_payment_orders log_payment_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_payment_orders @@ -3002,7 +3122,7 @@ ALTER TABLE ONLY public.log_payment_orders -- --- Name: log_registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_registrant_verifications log_registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_registrant_verifications @@ -3010,7 +3130,7 @@ ALTER TABLE ONLY public.log_registrant_verifications -- --- Name: log_registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_registrars log_registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_registrars @@ -3018,7 +3138,7 @@ ALTER TABLE ONLY public.log_registrars -- --- Name: log_reserved_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_reserved_domains log_reserved_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_reserved_domains @@ -3026,7 +3146,7 @@ ALTER TABLE ONLY public.log_reserved_domains -- --- Name: log_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_settings log_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_settings @@ -3034,7 +3154,7 @@ ALTER TABLE ONLY public.log_settings -- --- Name: log_users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_users log_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_users @@ -3042,7 +3162,7 @@ ALTER TABLE ONLY public.log_users -- --- Name: log_white_ips_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_white_ips log_white_ips_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.log_white_ips @@ -3050,7 +3170,7 @@ ALTER TABLE ONLY public.log_white_ips -- --- Name: nameservers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: nameservers nameservers_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.nameservers @@ -3058,7 +3178,7 @@ ALTER TABLE ONLY public.nameservers -- --- Name: notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: notifications notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.notifications @@ -3066,7 +3186,7 @@ ALTER TABLE ONLY public.notifications -- --- Name: payment_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: payment_orders payment_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.payment_orders @@ -3074,7 +3194,7 @@ ALTER TABLE ONLY public.payment_orders -- --- Name: prices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: prices prices_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prices @@ -3082,7 +3202,7 @@ ALTER TABLE ONLY public.prices -- --- Name: que_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: que_jobs que_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.que_jobs @@ -3090,7 +3210,7 @@ ALTER TABLE ONLY public.que_jobs -- --- Name: registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: registrant_verifications registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registrant_verifications @@ -3098,7 +3218,7 @@ ALTER TABLE ONLY public.registrant_verifications -- --- Name: registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: registrars registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registrars @@ -3106,7 +3226,7 @@ ALTER TABLE ONLY public.registrars -- --- Name: reserved_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: reserved_domains reserved_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.reserved_domains @@ -3114,7 +3234,7 @@ ALTER TABLE ONLY public.reserved_domains -- --- Name: settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: settings settings_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.settings @@ -3122,7 +3242,7 @@ ALTER TABLE ONLY public.settings -- --- Name: uniq_blocked_domains_name; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: blocked_domains uniq_blocked_domains_name; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.blocked_domains @@ -3130,7 +3250,7 @@ ALTER TABLE ONLY public.blocked_domains -- --- Name: uniq_contact_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: contacts uniq_contact_uuid; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.contacts @@ -3138,7 +3258,7 @@ ALTER TABLE ONLY public.contacts -- --- Name: uniq_domain_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: domains uniq_domain_uuid; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.domains @@ -3146,7 +3266,7 @@ ALTER TABLE ONLY public.domains -- --- Name: uniq_reserved_domains_name; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: reserved_domains uniq_reserved_domains_name; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.reserved_domains @@ -3154,7 +3274,7 @@ ALTER TABLE ONLY public.reserved_domains -- --- Name: uniq_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: auctions uniq_uuid; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.auctions @@ -3162,7 +3282,7 @@ ALTER TABLE ONLY public.auctions -- --- Name: unique_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: registrars unique_code; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registrars @@ -3170,7 +3290,7 @@ ALTER TABLE ONLY public.registrars -- --- Name: unique_contact_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: contacts unique_contact_code; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.contacts @@ -3178,7 +3298,7 @@ ALTER TABLE ONLY public.contacts -- --- Name: unique_name; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: registrars unique_name; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registrars @@ -3186,7 +3306,7 @@ ALTER TABLE ONLY public.registrars -- --- Name: unique_number; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: invoices unique_number; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.invoices @@ -3194,7 +3314,7 @@ ALTER TABLE ONLY public.invoices -- --- Name: unique_reference_no; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: registrars unique_reference_no; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registrars @@ -3202,7 +3322,7 @@ ALTER TABLE ONLY public.registrars -- --- Name: unique_registration_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: auctions unique_registration_code; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.auctions @@ -3210,7 +3330,7 @@ ALTER TABLE ONLY public.auctions -- --- Name: unique_session_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: epp_sessions unique_session_id; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.epp_sessions @@ -3218,7 +3338,7 @@ ALTER TABLE ONLY public.epp_sessions -- --- Name: unique_zone_origin; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: zones unique_zone_origin; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.zones @@ -3226,7 +3346,7 @@ ALTER TABLE ONLY public.zones -- --- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.users @@ -3234,7 +3354,7 @@ ALTER TABLE ONLY public.users -- --- Name: versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: versions versions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.versions @@ -3242,7 +3362,7 @@ ALTER TABLE ONLY public.versions -- --- Name: white_ips_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: white_ips white_ips_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.white_ips @@ -3250,7 +3370,7 @@ ALTER TABLE ONLY public.white_ips -- --- Name: whois_records_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: whois_records whois_records_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.whois_records @@ -3258,7 +3378,7 @@ ALTER TABLE ONLY public.whois_records -- --- Name: zones_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: zones zones_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.zones @@ -3266,581 +3386,602 @@ ALTER TABLE ONLY public.zones -- --- Name: index_account_activities_on_account_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: contacts_object_id_idx; Type: INDEX; Schema: audit; Owner: - +-- + +CREATE INDEX contacts_object_id_idx ON audit.contacts USING btree (object_id); + + +-- +-- Name: contacts_recorded_at_idx; Type: INDEX; Schema: audit; Owner: - +-- + +CREATE INDEX contacts_recorded_at_idx ON audit.contacts USING btree (recorded_at); + + +-- +-- Name: index_account_activities_on_account_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_account_activities_on_account_id ON public.account_activities USING btree (account_id); -- --- Name: index_account_activities_on_bank_transaction_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_account_activities_on_bank_transaction_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_account_activities_on_bank_transaction_id ON public.account_activities USING btree (bank_transaction_id); -- --- Name: index_account_activities_on_invoice_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_account_activities_on_invoice_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_account_activities_on_invoice_id ON public.account_activities USING btree (invoice_id); -- --- Name: index_accounts_on_registrar_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_accounts_on_registrar_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_accounts_on_registrar_id ON public.accounts USING btree (registrar_id); -- --- Name: index_certificates_on_api_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_certificates_on_api_user_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_certificates_on_api_user_id ON public.certificates USING btree (api_user_id); -- --- Name: index_contacts_on_code; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_contacts_on_code; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_contacts_on_code ON public.contacts USING btree (code); -- --- Name: index_contacts_on_registrar_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_contacts_on_registrar_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_contacts_on_registrar_id ON public.contacts USING btree (registrar_id); -- --- Name: index_contacts_on_registrar_id_and_ident_type; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_contacts_on_registrar_id_and_ident_type; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_contacts_on_registrar_id_and_ident_type ON public.contacts USING btree (registrar_id, ident_type); -- --- Name: index_directos_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_directos_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_directos_on_item_type_and_item_id ON public.directos USING btree (item_type, item_id); -- --- Name: index_dnskeys_on_domain_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_dnskeys_on_domain_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_dnskeys_on_domain_id ON public.dnskeys USING btree (domain_id); -- --- Name: index_dnskeys_on_legacy_domain_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_dnskeys_on_legacy_domain_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_dnskeys_on_legacy_domain_id ON public.dnskeys USING btree (legacy_domain_id); -- --- Name: index_domain_contacts_on_contact_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_domain_contacts_on_contact_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_domain_contacts_on_contact_id ON public.domain_contacts USING btree (contact_id); -- --- Name: index_domain_contacts_on_domain_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_domain_contacts_on_domain_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_domain_contacts_on_domain_id ON public.domain_contacts USING btree (domain_id); -- --- Name: index_domain_transfers_on_domain_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_domain_transfers_on_domain_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_domain_transfers_on_domain_id ON public.domain_transfers USING btree (domain_id); -- --- Name: index_domains_on_delete_date; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_domains_on_delete_date; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_domains_on_delete_date ON public.domains USING btree (delete_date); -- --- Name: index_domains_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_domains_on_name; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_domains_on_name ON public.domains USING btree (name); -- --- Name: index_domains_on_outzone_at; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_domains_on_outzone_at; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_domains_on_outzone_at ON public.domains USING btree (outzone_at); -- --- Name: index_domains_on_registrant_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_domains_on_registrant_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_domains_on_registrant_id ON public.domains USING btree (registrant_id); -- --- Name: index_domains_on_registrant_verification_asked_at; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_domains_on_registrant_verification_asked_at; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_domains_on_registrant_verification_asked_at ON public.domains USING btree (registrant_verification_asked_at); -- --- Name: index_domains_on_registrant_verification_token; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_domains_on_registrant_verification_token; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_domains_on_registrant_verification_token ON public.domains USING btree (registrant_verification_token); -- --- Name: index_domains_on_registrar_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_domains_on_registrar_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_domains_on_registrar_id ON public.domains USING btree (registrar_id); -- --- Name: index_domains_on_statuses; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_domains_on_statuses; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_domains_on_statuses ON public.domains USING gin (statuses); -- --- Name: index_epp_sessions_on_updated_at; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_epp_sessions_on_updated_at; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_epp_sessions_on_updated_at ON public.epp_sessions USING btree (updated_at); -- --- Name: index_invoice_items_on_invoice_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_invoice_items_on_invoice_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_invoice_items_on_invoice_id ON public.invoice_items USING btree (invoice_id); -- --- Name: index_invoices_on_buyer_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_invoices_on_buyer_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_invoices_on_buyer_id ON public.invoices USING btree (buyer_id); -- --- Name: index_legal_documents_on_checksum; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_legal_documents_on_checksum; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_legal_documents_on_checksum ON public.legal_documents USING btree (checksum); -- --- Name: index_legal_documents_on_documentable_type_and_documentable_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_legal_documents_on_documentable_type_and_documentable_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_legal_documents_on_documentable_type_and_documentable_id ON public.legal_documents USING btree (documentable_type, documentable_id); -- --- Name: index_log_account_activities_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_account_activities_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_account_activities_on_item_type_and_item_id ON public.log_account_activities USING btree (item_type, item_id); -- --- Name: index_log_account_activities_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_account_activities_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_account_activities_on_whodunnit ON public.log_account_activities USING btree (whodunnit); -- --- Name: index_log_accounts_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_accounts_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_accounts_on_item_type_and_item_id ON public.log_accounts USING btree (item_type, item_id); -- --- Name: index_log_accounts_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_accounts_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_accounts_on_whodunnit ON public.log_accounts USING btree (whodunnit); -- --- Name: index_log_bank_statements_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_bank_statements_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_bank_statements_on_item_type_and_item_id ON public.log_bank_statements USING btree (item_type, item_id); -- --- Name: index_log_bank_statements_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_bank_statements_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_bank_statements_on_whodunnit ON public.log_bank_statements USING btree (whodunnit); -- --- Name: index_log_bank_transactions_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_bank_transactions_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_bank_transactions_on_item_type_and_item_id ON public.log_bank_transactions USING btree (item_type, item_id); -- --- Name: index_log_bank_transactions_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_bank_transactions_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_bank_transactions_on_whodunnit ON public.log_bank_transactions USING btree (whodunnit); -- --- Name: index_log_blocked_domains_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_blocked_domains_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_blocked_domains_on_item_type_and_item_id ON public.log_blocked_domains USING btree (item_type, item_id); -- --- Name: index_log_blocked_domains_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_blocked_domains_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_blocked_domains_on_whodunnit ON public.log_blocked_domains USING btree (whodunnit); -- --- Name: index_log_certificates_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_certificates_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_certificates_on_item_type_and_item_id ON public.log_certificates USING btree (item_type, item_id); -- --- Name: index_log_certificates_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_certificates_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_certificates_on_whodunnit ON public.log_certificates USING btree (whodunnit); -- --- Name: index_log_contacts_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_contacts_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_contacts_on_item_type_and_item_id ON public.log_contacts USING btree (item_type, item_id); -- --- Name: index_log_contacts_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_contacts_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_contacts_on_whodunnit ON public.log_contacts USING btree (whodunnit); -- --- Name: index_log_dnskeys_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_dnskeys_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_dnskeys_on_item_type_and_item_id ON public.log_dnskeys USING btree (item_type, item_id); -- --- Name: index_log_dnskeys_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_dnskeys_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_dnskeys_on_whodunnit ON public.log_dnskeys USING btree (whodunnit); -- --- Name: index_log_domain_contacts_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_domain_contacts_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_domain_contacts_on_item_type_and_item_id ON public.log_domain_contacts USING btree (item_type, item_id); -- --- Name: index_log_domain_contacts_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_domain_contacts_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_domain_contacts_on_whodunnit ON public.log_domain_contacts USING btree (whodunnit); -- --- Name: index_log_domains_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_domains_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_domains_on_item_type_and_item_id ON public.log_domains USING btree (item_type, item_id); -- --- Name: index_log_domains_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_domains_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_domains_on_whodunnit ON public.log_domains USING btree (whodunnit); -- --- Name: index_log_invoice_items_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_invoice_items_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_invoice_items_on_item_type_and_item_id ON public.log_invoice_items USING btree (item_type, item_id); -- --- Name: index_log_invoice_items_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_invoice_items_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_invoice_items_on_whodunnit ON public.log_invoice_items USING btree (whodunnit); -- --- Name: index_log_invoices_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_invoices_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_invoices_on_item_type_and_item_id ON public.log_invoices USING btree (item_type, item_id); -- --- Name: index_log_invoices_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_invoices_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_invoices_on_whodunnit ON public.log_invoices USING btree (whodunnit); -- --- Name: index_log_nameservers_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_nameservers_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_nameservers_on_item_type_and_item_id ON public.log_nameservers USING btree (item_type, item_id); -- --- Name: index_log_nameservers_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_nameservers_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_nameservers_on_whodunnit ON public.log_nameservers USING btree (whodunnit); -- --- Name: index_log_notifications_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_notifications_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_notifications_on_item_type_and_item_id ON public.log_notifications USING btree (item_type, item_id); -- --- Name: index_log_notifications_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_notifications_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_notifications_on_whodunnit ON public.log_notifications USING btree (whodunnit); -- --- Name: index_log_registrant_verifications_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_registrant_verifications_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_registrant_verifications_on_item_type_and_item_id ON public.log_registrant_verifications USING btree (item_type, item_id); -- --- Name: index_log_registrant_verifications_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_registrant_verifications_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_registrant_verifications_on_whodunnit ON public.log_registrant_verifications USING btree (whodunnit); -- --- Name: index_log_registrars_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_registrars_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_registrars_on_item_type_and_item_id ON public.log_registrars USING btree (item_type, item_id); -- --- Name: index_log_registrars_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_registrars_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_registrars_on_whodunnit ON public.log_registrars USING btree (whodunnit); -- --- Name: index_log_reserved_domains_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_reserved_domains_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_reserved_domains_on_item_type_and_item_id ON public.log_reserved_domains USING btree (item_type, item_id); -- --- Name: index_log_reserved_domains_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_reserved_domains_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_reserved_domains_on_whodunnit ON public.log_reserved_domains USING btree (whodunnit); -- --- Name: index_log_settings_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_settings_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_settings_on_item_type_and_item_id ON public.log_settings USING btree (item_type, item_id); -- --- Name: index_log_settings_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_settings_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_settings_on_whodunnit ON public.log_settings USING btree (whodunnit); -- --- Name: index_log_users_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_users_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_users_on_item_type_and_item_id ON public.log_users USING btree (item_type, item_id); -- --- Name: index_log_users_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_users_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_log_users_on_whodunnit ON public.log_users USING btree (whodunnit); -- --- Name: index_nameservers_on_domain_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_nameservers_on_domain_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_nameservers_on_domain_id ON public.nameservers USING btree (domain_id); -- --- Name: index_notifications_on_registrar_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_notifications_on_registrar_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_notifications_on_registrar_id ON public.notifications USING btree (registrar_id); -- --- Name: index_payment_orders_on_invoice_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_payment_orders_on_invoice_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_payment_orders_on_invoice_id ON public.payment_orders USING btree (invoice_id); -- --- Name: index_prices_on_zone_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_prices_on_zone_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_prices_on_zone_id ON public.prices USING btree (zone_id); -- --- Name: index_registrant_verifications_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_registrant_verifications_on_created_at; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_registrant_verifications_on_created_at ON public.registrant_verifications USING btree (created_at); -- --- Name: index_registrant_verifications_on_domain_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_registrant_verifications_on_domain_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_registrant_verifications_on_domain_id ON public.registrant_verifications USING btree (domain_id); -- --- Name: index_settings_on_thing_type_and_thing_id_and_var; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_settings_on_thing_type_and_thing_id_and_var; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_settings_on_thing_type_and_thing_id_and_var ON public.settings USING btree (thing_type, thing_id, var); -- --- Name: index_users_on_identity_code; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_users_on_identity_code; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_users_on_identity_code ON public.users USING btree (identity_code); -- --- Name: index_users_on_registrar_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_users_on_registrar_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_users_on_registrar_id ON public.users USING btree (registrar_id); -- --- Name: index_versions_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_versions_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_versions_on_item_type_and_item_id ON public.versions USING btree (item_type, item_id); -- --- Name: index_whois_records_on_domain_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_whois_records_on_domain_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_whois_records_on_domain_id ON public.whois_records USING btree (domain_id); -- --- Name: index_whois_records_on_registrar_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_whois_records_on_registrar_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_whois_records_on_registrar_id ON public.whois_records USING btree (registrar_id); -- --- Name: log_contacts_object_legacy_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: log_contacts_object_legacy_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX log_contacts_object_legacy_id ON public.log_contacts USING btree ((((object ->> 'legacy_id'::text))::integer)); -- --- Name: log_dnskeys_object_legacy_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: log_dnskeys_object_legacy_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX log_dnskeys_object_legacy_id ON public.log_contacts USING btree ((((object ->> 'legacy_domain_id'::text))::integer)); -- --- Name: log_domains_object_legacy_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: log_domains_object_legacy_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX log_domains_object_legacy_id ON public.log_contacts USING btree ((((object ->> 'legacy_id'::text))::integer)); -- --- Name: log_nameservers_object_legacy_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: log_nameservers_object_legacy_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX log_nameservers_object_legacy_id ON public.log_contacts USING btree ((((object ->> 'legacy_domain_id'::text))::integer)); -- --- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX unique_schema_migrations ON public.schema_migrations USING btree (version); -- --- Name: contacts_registrar_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: contacts process_contact_audit; Type: TRIGGER; Schema: public; Owner: - +-- + +CREATE TRIGGER process_contact_audit AFTER INSERT OR DELETE OR UPDATE ON public.contacts FOR EACH ROW EXECUTE PROCEDURE public.process_contact_audit(); + + +-- +-- Name: contacts contacts_registrar_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.contacts @@ -3848,7 +3989,7 @@ ALTER TABLE ONLY public.contacts -- --- Name: domain_contacts_contact_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: domain_contacts domain_contacts_contact_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.domain_contacts @@ -3856,7 +3997,7 @@ ALTER TABLE ONLY public.domain_contacts -- --- Name: domain_contacts_domain_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: domain_contacts domain_contacts_domain_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.domain_contacts @@ -3864,7 +4005,7 @@ ALTER TABLE ONLY public.domain_contacts -- --- Name: domains_registrant_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: domains domains_registrant_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.domains @@ -3872,7 +4013,7 @@ ALTER TABLE ONLY public.domains -- --- Name: domains_registrar_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: domains domains_registrar_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.domains @@ -3880,7 +4021,7 @@ ALTER TABLE ONLY public.domains -- --- Name: fk_rails_242b91538b; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: invoices fk_rails_242b91538b; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.invoices @@ -3888,7 +4029,7 @@ ALTER TABLE ONLY public.invoices -- --- Name: fk_rails_36cff3de9c; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: white_ips fk_rails_36cff3de9c; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.white_ips @@ -3896,7 +4037,7 @@ ALTER TABLE ONLY public.white_ips -- --- Name: fk_rails_59c422f73d; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: domain_transfers fk_rails_59c422f73d; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.domain_transfers @@ -3904,7 +4045,7 @@ ALTER TABLE ONLY public.domain_transfers -- --- Name: fk_rails_78c376257f; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: prices fk_rails_78c376257f; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.prices @@ -3912,7 +4053,7 @@ ALTER TABLE ONLY public.prices -- --- Name: fk_rails_833ed7f3c0; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: domain_transfers fk_rails_833ed7f3c0; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.domain_transfers @@ -3920,7 +4061,7 @@ ALTER TABLE ONLY public.domain_transfers -- --- Name: fk_rails_86cd2b09f5; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: account_activities fk_rails_86cd2b09f5; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.account_activities @@ -3928,7 +4069,7 @@ ALTER TABLE ONLY public.account_activities -- --- Name: fk_rails_87b8e40c63; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: domain_transfers fk_rails_87b8e40c63; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.domain_transfers @@ -3936,7 +4077,7 @@ ALTER TABLE ONLY public.domain_transfers -- --- Name: fk_rails_8c6b5c12eb; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: actions fk_rails_8c6b5c12eb; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.actions @@ -3944,7 +4085,7 @@ ALTER TABLE ONLY public.actions -- --- Name: fk_rails_8f9734b530; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: notifications fk_rails_8f9734b530; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.notifications @@ -3952,7 +4093,7 @@ ALTER TABLE ONLY public.notifications -- --- Name: fk_rails_a5ae3c203d; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: actions fk_rails_a5ae3c203d; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.actions @@ -3960,7 +4101,7 @@ ALTER TABLE ONLY public.actions -- --- Name: fk_rails_adff2dc8e3; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: epp_sessions fk_rails_adff2dc8e3; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.epp_sessions @@ -3968,7 +4109,7 @@ ALTER TABLE ONLY public.epp_sessions -- --- Name: fk_rails_b80dbb973d; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: account_activities fk_rails_b80dbb973d; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.account_activities @@ -3976,7 +4117,7 @@ ALTER TABLE ONLY public.account_activities -- --- Name: fk_rails_c9f635c0b3; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: accounts fk_rails_c9f635c0b3; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.accounts @@ -3984,7 +4125,7 @@ ALTER TABLE ONLY public.accounts -- --- Name: fk_rails_ce38d749f6; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: account_activities fk_rails_ce38d749f6; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.account_activities @@ -3992,7 +4133,7 @@ ALTER TABLE ONLY public.account_activities -- --- Name: fk_rails_d2cc3c2fa9; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: account_activities fk_rails_d2cc3c2fa9; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.account_activities @@ -4000,7 +4141,7 @@ ALTER TABLE ONLY public.account_activities -- --- Name: fk_rails_f41617a0e9; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: registrant_verifications fk_rails_f41617a0e9; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.registrant_verifications @@ -4008,7 +4149,7 @@ ALTER TABLE ONLY public.registrant_verifications -- --- Name: fk_rails_f9dc5857c3; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: payment_orders fk_rails_f9dc5857c3; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.payment_orders @@ -4016,7 +4157,7 @@ ALTER TABLE ONLY public.payment_orders -- --- Name: invoice_items_invoice_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: invoice_items invoice_items_invoice_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.invoice_items @@ -4024,7 +4165,7 @@ ALTER TABLE ONLY public.invoice_items -- --- Name: messages_registrar_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: notifications messages_registrar_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.notifications @@ -4032,7 +4173,7 @@ ALTER TABLE ONLY public.notifications -- --- Name: nameservers_domain_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: nameservers nameservers_domain_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.nameservers @@ -4040,7 +4181,7 @@ ALTER TABLE ONLY public.nameservers -- --- Name: user_registrar_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: users user_registrar_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.users @@ -4463,5 +4604,10 @@ INSERT INTO "schema_migrations" (version) VALUES ('20200130092113'), ('20200203143458'), ('20200204103125'), -('20200311114649'); +('20200310105731'), +('20200310105736'), +('20200311111515'), +('20200311114649'), +('20200421093637'); + diff --git a/lib/schemas/eis-1.0.xsd b/lib/schemas/eis-1.0.xsd index ddb3602c0..6a6bc742d 100644 --- a/lib/schemas/eis-1.0.xsd +++ b/lib/schemas/eis-1.0.xsd @@ -25,6 +25,7 @@ + @@ -49,6 +50,16 @@ + + + + + + + + diff --git a/lib/tasks/whois.rake b/lib/tasks/whois.rake index c38b2c5ba..52be7e17f 100644 --- a/lib/tasks/whois.rake +++ b/lib/tasks/whois.rake @@ -35,6 +35,11 @@ namespace :whois do ReservedDomain.find_in_batches.each do |group| UpdateWhoisRecordJob.enqueue group.map(&:name), 'reserved' end + + print "\n-----> Update disputed domains whois_records" + Dispute.active.find_in_batches.each do |group| + UpdateWhoisRecordJob.enqueue group.map(&:domain_name), 'disputed' + end end puts "\n-----> all done in #{(Time.zone.now.to_f - start).round(2)} seconds" end