From db6326e798d7eabd4df0f54579bfc856e490e23c Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Thu, 8 Aug 2019 15:00:13 +0300 Subject: [PATCH 01/15] Remove unused script --- bin/update-repo | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100755 bin/update-repo diff --git a/bin/update-repo b/bin/update-repo deleted file mode 100755 index ae0cd536b1..0000000000 --- a/bin/update-repo +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# -# Update repo -# - -# cd to Rails root directory -cd "$(dirname "$0")"; cd .. - -git pull origin master &> /dev/null -git reset --hard &> /dev/null -unset GIT_DIR GIT_WORK_TREE From 8d67301d625878c5235a34b466c1efff5f7edfa6 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Sat, 10 Aug 2019 17:22:39 +0300 Subject: [PATCH 02/15] Remove unused factory --- spec/factories/bank_transaction.rb | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 spec/factories/bank_transaction.rb diff --git a/spec/factories/bank_transaction.rb b/spec/factories/bank_transaction.rb deleted file mode 100644 index ebe4719848..0000000000 --- a/spec/factories/bank_transaction.rb +++ /dev/null @@ -1,8 +0,0 @@ -FactoryBot.define do - factory :bank_transaction do - currency { 'EUR' } - sum { 100.0 } - description { 'Invoice no. 1' } - reference_no { 'RF2405752128' } - end -end From 5a68035818cd0a3af95b8379e27516b50833de9f Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Sun, 11 Aug 2019 22:02:19 +0300 Subject: [PATCH 03/15] Remove unused db column --- app/models/invoice.rb | 1 - app/views/registrar/invoices/index.haml | 2 +- ...0190811184334_remove_invoices_seller_id.rb | 5 +++ db/structure.sql | 10 ++---- .../registrar_area/invoices/list_test.rb | 33 +++++++------------ 5 files changed, 20 insertions(+), 31 deletions(-) create mode 100644 db/migrate/20190811184334_remove_invoices_seller_id.rb diff --git a/app/models/invoice.rb b/app/models/invoice.rb index a36825848d..50453f61fc 100644 --- a/app/models/invoice.rb +++ b/app/models/invoice.rb @@ -3,7 +3,6 @@ class Invoice < ActiveRecord::Base include Concerns::Invoice::Cancellable include Concerns::Invoice::Payable - belongs_to :seller, class_name: 'Registrar' belongs_to :buyer, class_name: 'Registrar' has_one :account_activity has_many :items, class_name: 'InvoiceItem', dependent: :destroy diff --git a/app/views/registrar/invoices/index.haml b/app/views/registrar/invoices/index.haml index 9ed8b91d54..76a2966b53 100644 --- a/app/views/registrar/invoices/index.haml +++ b/app/views/registrar/invoices/index.haml @@ -57,7 +57,7 @@ %th{class: 'col-xs-3'}= t(:total) %tbody - @invoices.each do |invoice| - %tr.invoice + %tr %td= link_to(invoice, [:registrar, invoice]) - if invoice.paid? %td= l invoice.receipt_date diff --git a/db/migrate/20190811184334_remove_invoices_seller_id.rb b/db/migrate/20190811184334_remove_invoices_seller_id.rb new file mode 100644 index 0000000000..d96dfedb41 --- /dev/null +++ b/db/migrate/20190811184334_remove_invoices_seller_id.rb @@ -0,0 +1,5 @@ +class RemoveInvoicesSellerId < ActiveRecord::Migration + def change + remove_column :invoices, :seller_id + end +end diff --git a/db/structure.sql b/db/structure.sql index befd74afd3..a3d9fb4816 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -935,7 +935,6 @@ CREATE TABLE public.invoices ( description character varying, reference_no character varying NOT NULL, vat_rate numeric(4,3) NOT NULL, - seller_id integer, seller_name character varying NOT NULL, seller_reg_no character varying, seller_iban character varying NOT NULL, @@ -3453,13 +3452,6 @@ CREATE INDEX index_invoice_items_on_invoice_id ON public.invoice_items USING btr CREATE INDEX index_invoices_on_buyer_id ON public.invoices USING btree (buyer_id); --- --- Name: index_invoices_on_seller_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX index_invoices_on_seller_id ON public.invoices USING btree (seller_id); - - -- -- Name: index_keyrelays_on_accepter_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- @@ -4817,3 +4809,5 @@ INSERT INTO schema_migrations (version) VALUES ('20190617122505'); INSERT INTO schema_migrations (version) VALUES ('20190620084334'); +INSERT INTO schema_migrations (version) VALUES ('20190811184334'); + diff --git a/test/system/registrar_area/invoices/list_test.rb b/test/system/registrar_area/invoices/list_test.rb index e63d8c1a48..b6d659a96b 100644 --- a/test/system/registrar_area/invoices/list_test.rb +++ b/test/system/registrar_area/invoices/list_test.rb @@ -3,10 +3,9 @@ class ListInvoicesTest < ApplicationSystemTestCase setup do @user = users(:api_bestnames) - sign_in @user - @invoice = invoices(:one) - eliminate_effect_of_other_invoices + + sign_in @user end def test_show_balance @@ -14,31 +13,23 @@ def test_show_balance assert_text "Your current account balance is 100,00 EUR" end - def test_show_invoices_of_current_registrar - registrar = registrars(:bestnames) - @user.update!(registrar: registrar) - @invoice.update!(seller: registrar) + def test_shows_invoice_owned_by_current_user + owning_registrar = registrars(:bestnames) + assert_equal owning_registrar, @user.registrar + @invoice.update!(buyer: owning_registrar) visit registrar_invoices_url - assert_css '.invoice' + assert_text @invoice.to_s end - def test_do_not_show_invoices_of_other_registrars - registrar = registrars(:goodnames) - @user.update!(registrar: registrar) - @invoice.update!(seller: registrar) + def test_hides_invoice_owned_by_other_user + other_registrar = registrars(:goodnames) + assert_not_equal other_registrar, @user.registrar + @invoice.update!(buyer: other_registrar) visit registrar_invoices_url - assert_no_css '.invoice' - end - - private - - def eliminate_effect_of_other_invoices - Invoice.connection.disable_referential_integrity do - Invoice.delete_all("id != #{@invoice.id}") - end + assert_no_text @invoice.to_s end end \ No newline at end of file From 04cc904e2e27ca19e8e6f9fbf315a234363eb37b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20V=C3=B5hmar?= Date: Wed, 21 Aug 2019 16:09:50 +0300 Subject: [PATCH 04/15] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dc8e6bbed..f11fd5701e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +21.08.2019 +* Nokogiri update to 1.10.4 (CVE-2019-5477) [#1266](https://github.com/internetee/registry/pull/1266) + 08.07.2019 * Invoices are not delivered to e-invoice provider when registrar has no billing email [#1255](https://github.com/internetee/registry/issues/1255) From 1dc6ef7ddf600920b6edca49579358c546454b09 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Wed, 3 Jul 2019 14:51:16 +0300 Subject: [PATCH 05/15] Process payments automatically Closes #1232 --- Gemfile | 1 + Gemfile.lock | 11 +++ config/application-example.yml | 9 ++ config/schedule.rb | 7 ++ .../bank_transactions.xml | 73 ++++++++++++++++ .../create_bank_transactions.rake | 41 +++++++++ lib/tasks/invoices/process_payments.rake | 49 +++++++++++ test/fixtures/files/keystore.jks | Bin 0 -> 2242 bytes test/tasks/invoices/process_payments_test.rb | 78 ++++++++++++++++++ 9 files changed, 269 insertions(+) create mode 100644 lib/tasks/dev/create_bank_transactions/bank_transactions.xml create mode 100644 lib/tasks/dev/create_bank_transactions/create_bank_transactions.rake create mode 100644 lib/tasks/invoices/process_payments.rake create mode 100644 test/fixtures/files/keystore.jks create mode 100644 test/tasks/invoices/process_payments_test.rb diff --git a/Gemfile b/Gemfile index fb61fd2baa..59882bed6e 100644 --- a/Gemfile +++ b/Gemfile @@ -92,6 +92,7 @@ gem 'airbrake' gem 'company_register', github: 'internetee/company_register', branch: :master gem 'e_invoice', github: 'internetee/e_invoice', branch: :master +gem 'lhv', github: 'internetee/lhv', tag: 'v0.1.0' group :development do # deploy diff --git a/Gemfile.lock b/Gemfile.lock index d71c55eee3..4a4d77bbb6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -41,6 +41,15 @@ GIT hpricot libxml-ruby +GIT + remote: https://github.com/internetee/lhv.git + revision: e211516bc5fff2139584d4da41c17511863c229d + tag: v0.1.0 + specs: + lhv (0.1.0) + keystores + nokogiri + GIT remote: https://github.com/tarmotalu/digidoc_client.git revision: 1645e83a5a548addce383f75703b0275c5310c32 @@ -231,6 +240,7 @@ GEM kaminari (0.16.3) actionpack (>= 3.0.0) activesupport (>= 3.0.0) + keystores (0.4.0) libxml-ruby (3.0.0) loofah (2.2.3) crass (~> 1.0.2) @@ -479,6 +489,7 @@ DEPENDENCIES jquery-rails (= 4.0.4) jquery-ui-rails (= 5.0.5) kaminari (= 0.16.3) + lhv! mina (= 0.3.1) money-rails nokogiri diff --git a/config/application-example.yml b/config/application-example.yml index 0738a92784..de0e8f6819 100644 --- a/config/application-example.yml +++ b/config/application-example.yml @@ -152,6 +152,12 @@ action_mailer_default_port: # default: no port (80) action_mailer_default_from: # no-reply@example.com action_mailer_force_delete_from: # `From` header for `DomainDeleteMailer#forced` email +lhv_keystore: +lhv_keystore_password: +lhv_keystore_alias: +lhv_ca_file: # Needed only in dev mode +lhv_dev_mode: 'false' + # Since the keys for staging are absent from the repo, we need to supply them separate for testing. test: payments_seb_bank_certificate: 'test/fixtures/files/seb_bank_cert.pem' @@ -161,6 +167,9 @@ test: action_mailer_default_host: 'registry.test' action_mailer_default_from: 'no-reply@registry.test' action_mailer_force_delete_from: 'legal@registry.test' + lhv_keystore: 'test/fixtures/files/keystore.jks' + lhv_keystore_password: 'testtest' + lhv_keystore_alias: 'testtest' # Airbrake // Errbit: airbrake_host: "https://your-errbit-host.ee" diff --git a/config/schedule.rb b/config/schedule.rb index d47b45ea91..fe920dc6de 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -57,6 +57,13 @@ every 42.minutes do rake 'domain:discard' end + + # Should be at least once every 4 days, since according to LHV specs: + # "Unread messages older than 5 days are automatically scheduled for deletion" + # https://partners.lhv.ee/en/connect/#messaging + every :day, at: '12:01am' do + rake 'invoices:process_payments' + end end every 10.minutes do diff --git a/lib/tasks/dev/create_bank_transactions/bank_transactions.xml b/lib/tasks/dev/create_bank_transactions/bank_transactions.xml new file mode 100644 index 0000000000..72a53b697d --- /dev/null +++ b/lib/tasks/dev/create_bank_transactions/bank_transactions.xml @@ -0,0 +1,73 @@ + + + + + populated by rake task + 2019-07-28T10:00:00 + 1 + + 0.1 + + ABC Corporation + + + + test3 + TRF + false + 1 + 2019-07-28 + + test + + + + populated by rake task + + EUR + + + + LHVBEE22 + + + + + ABC/090928/CCT001/01 + ABC/4562/2009-09-08 + + + + 0.1 + + SHAR + + + LHVBEE22 + + + + DEF Electronics + + Corn Exchange 5th Floor + + + + + populated by rake task + + + + + 1 + + + + 13 + + + + + + + diff --git a/lib/tasks/dev/create_bank_transactions/create_bank_transactions.rake b/lib/tasks/dev/create_bank_transactions/create_bank_transactions.rake new file mode 100644 index 0000000000..33614d049f --- /dev/null +++ b/lib/tasks/dev/create_bank_transactions/create_bank_transactions.rake @@ -0,0 +1,41 @@ +namespace :dev do + task create_bank_transactions: :environment do + remitter_iban = ENV['remitter_iban'] + beneficiary_iban = Setting.registry_iban + + keystore_password = ENV['lhv_keystore_password'] + keystore_alias = ENV['lhv_keystore_alias'] + keystore = Keystores::JavaKeystore.new + keystore.load(ENV['lhv_keystore'], keystore_password) + cert = keystore.get_certificate(keystore_alias) + key = keystore.get_key(keystore_alias, keystore_password) + + api_base_uri = URI.parse('https://testconnect.lhv.eu/connect-prelive') + request_headers = { 'content-type' => 'application/xml' } + + request_xml = File.binread(File.join(__dir__, 'bank_transactions.xml')) + request_xml_doc = Nokogiri::XML(request_xml) + request_xml_doc.at_css('CstmrCdtTrfInitn > GrpHdr > MsgId').content = SecureRandom.hex + request_xml_doc.at_css('CstmrCdtTrfInitn > PmtInf > DbtrAcct > Id > IBAN') + .content = remitter_iban + request_xml_doc.at_css('CstmrCdtTrfInitn > PmtInf > CdtTrfTxInf > CdtrAcct > Id > IBAN') + .content = beneficiary_iban + request_body = request_xml_doc.to_xml + + http = Net::HTTP.new(api_base_uri.host, api_base_uri.port) + http.use_ssl = api_base_uri.is_a?(URI::HTTPS) + http.cert = cert + http.key = key + http.ca_file = ENV['lhv_ca_file'] + + http.start do + response = http.post(api_base_uri.path + '/payment', request_body, request_headers) + + if response.is_a?(Net::HTTPSuccess) + puts 'Success' + else + puts 'Failure' + end + end + end +end \ No newline at end of file diff --git a/lib/tasks/invoices/process_payments.rake b/lib/tasks/invoices/process_payments.rake new file mode 100644 index 0000000000..6e4c572139 --- /dev/null +++ b/lib/tasks/invoices/process_payments.rake @@ -0,0 +1,49 @@ +namespace :invoices do + task process_payments: :environment do + registry_bank_account_iban = Setting.registry_iban + + keystore_password = ENV['lhv_keystore_password'] + keystore_alias = ENV['lhv_keystore_alias'] + keystore = Keystores::JavaKeystore.new + keystore.load(ENV['lhv_keystore'], keystore_password) + cert = keystore.get_certificate(keystore_alias) + key = keystore.get_key(keystore_alias, keystore_password) + + api = Lhv::ConnectApi.new + api.cert = cert + api.key = key + api.ca_file = ENV['lhv_ca_file'] + api.dev_mode = ENV['lhv_dev_mode'] == 'true' + + incoming_transactions = [] + + api.credit_debit_notification_messages.each do |message| + next unless message.bank_account_iban == registry_bank_account_iban + + message.credit_transactions.each do |credit_transaction| + incoming_transactions << credit_transaction + end + end + + if incoming_transactions.any? + bank_statement = BankStatement.new(bank_code: Setting.registry_bank_code, + iban: Setting.registry_iban) + + ActiveRecord::Base.transaction do + bank_statement.save! + + incoming_transactions.each do |incoming_transaction| + transaction_attributes = { sum: incoming_transaction.amount, + currency: incoming_transaction.currency, + paid_at: incoming_transaction.date, + reference_no: incoming_transaction.payment_reference_number, + description: incoming_transaction.payment_description } + transaction = bank_statement.bank_transactions.create!(transaction_attributes) + transaction.autobind_invoice + end + end + end + + puts "Transactions processed: #{incoming_transactions.size}" + end +end \ No newline at end of file diff --git a/test/fixtures/files/keystore.jks b/test/fixtures/files/keystore.jks new file mode 100644 index 0000000000000000000000000000000000000000..7ce34f308d5df462a90842275cecdb54f6fef5ac GIT binary patch literal 2242 zcmchYS5VW58pZQZLP(@ZS%UNuFrY|6LRG4iD1wq0dJ}1yEU+NLg0$c!2ulf|$fAgV zFiLMqk!I*62uKqaM2Sj?2rMAg%iX#6&d&ILAI`)1J$-ZL%=r$u2V4*c1U?k-x1cw? zgKr!f>Pyl0L^j;iLMA?U*BE~Ic;{x7h$jG9xLQl zEzf4?w3~P(#%`%9y4NkX&Mmv5{cwiOwEjUOHgSO4@3);~;NGbBGcU~}j@`!hx%C;> z=RhHW5n>z~0A}&`?W}|?aOro0F8hM%aw*mO6hCGxHwe`gy-A`;+SEp=m7W^p zbwahjtHdIDE=fzybMOsN7cJ?#7Ahwg=NX{5}TD6;Lvy z7Os_>s#^6z?aT-am7w(*K1nm1EY8X0CYVp6wErEKuT@fJe+o3m`a<62c_s<7)pXwT zkLJp6Gf;gZI={L0Oe?p@Q1`E-9_TKH2G$(AQBfz(-@+B<6{&YxJ&$Ycx}>`*qSNTU zRD1%e_y+kzaA!DY#D@fC$)93*31Nd7vb4(Pa1)1L=2NSlpVj|fp{ID;48bxOEGJc# z&|w6c$g`V6u$at-0hNeeLHwB9lkr zEa~?_p9ZuGhZeY#BYuGw&}L}d*WLpPJc~IBs(Y458frZRhq6Sw`os7CzE3=$G5j_ z)lPm;YTDN0PFu`&246nEvaZ>JsYE z$-JO@&KBOSoD=3EKA%?TNiiDzBrbUEcBXt>BMviGdwQYJY9f8Fq~q7gSJX2Qjbzyv zza<}rbuyx1v3S_>Sxj`ey~#VtO;jtks30`l@TT$BL>tN7*#=row+$)ru7x_66I>

#;q z{e!G#eTxM{)FBS`iFc>N-=rDy5fFacA1p1Z$0PyjEFjVZ(!^wn@p)gTivOmQ?Ak_cA z1pWiz{ec|$f$;r6Apav6S)>3~52K6G!)jvma5$%bTPzl%^B?-U{xgolZvmkJ zLLdwcI0B{t0H`<|noSsbGSgf^RB(R3ahG2w6`Hmn|2y68+Il3ab<3>Yx)r=C*2Lc; zSJe|}4Tb<9AYTC^hmkpKh>Rdq94bbTugp$HuJtr#9gmW^IaO_Iq+jyS5Dz8RpAbE^Tlwo4qKM zVb9M-4#zpJ8Vt>jf?S#-QX|O;3$3c_Dgo&P?W>!NK4XM+j*FLhFcByWm9spjPK?JZ Q*B=|e+h($ literal 0 HcmV?d00001 diff --git a/test/tasks/invoices/process_payments_test.rb b/test/tasks/invoices/process_payments_test.rb new file mode 100644 index 0000000000..8c3b6ec73d --- /dev/null +++ b/test/tasks/invoices/process_payments_test.rb @@ -0,0 +1,78 @@ +require 'test_helper' + +class ProcessPaymentsTaskTest < ActiveSupport::TestCase + setup do + @payment_amount = payment_amount = 0.1 + @payment_currency = payment_currency = 'EUR' + @payment_date = payment_date = Date.parse('2010-07-05') + @payment_reference_number = payment_reference_number = '13' + @payment_description = payment_description = @invoice_number = '1234' + beneficiary_iban = 'GB33BUKB20201555555555' + + @invoice = create_payable_invoice(number: @invoice_number, + total: payment_amount, + currency: @payment_currency, + reference_no: @payment_reference_number) + Setting.registry_iban = beneficiary_iban + + Lhv::ConnectApi.class_eval do + define_method :credit_debit_notification_messages do + transaction = OpenStruct.new(amount: payment_amount, + currency: payment_currency, + date: payment_date, + payment_reference_number: payment_reference_number, + payment_description: payment_description) + message = OpenStruct.new(bank_account_iban: beneficiary_iban, + credit_transactions: [transaction]) + [message] + end + end + end + + def test_doubles_are_valid + assert Lhv::ConnectApi.method_defined?(:credit_debit_notification_messages) + assert Lhv::ConnectApi::Messages::CreditDebitNotification.method_defined?(:bank_account_iban) + assert Lhv::ConnectApi::Messages::CreditDebitNotification.method_defined?(:credit_transactions) + end + + def test_saves_transactions + assert_difference 'BankStatement.count' do + assert_difference 'BankTransaction.count' do + capture_io { run_task } + end + end + transaction = BankTransaction.last + assert_equal @payment_amount, transaction.sum + assert_equal @payment_currency, transaction.currency + assert_equal @payment_date, transaction.paid_at.to_date + assert_equal @payment_reference_number, transaction.reference_no + assert_equal @payment_description, transaction.description + end + + def test_marks_matched_invoice_as_paid + assert @invoice.unpaid? + + capture_io { run_task } + @invoice.reload + + assert @invoice.paid? + end + + def test_output + assert_output "Transactions processed: 1\n" do + run_task + end + end + + private + + def run_task + Rake::Task['invoices:process_payments'].execute + end + + def create_payable_invoice(attributes = {}) + invoice = invoices(:one) + invoice.update!({ account_activity: nil, cancelled_at: nil }.merge(attributes)) + invoice + end +end \ No newline at end of file From e53ec19db4548941094bbebd851ea7dd67252617 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Mon, 26 Aug 2019 14:41:45 +0300 Subject: [PATCH 06/15] Remove unused rake tasks --- .codeclimate.yml | 2 - lib/tasks/convert.rake | 117 -------- lib/tasks/statuses.rake | 625 ---------------------------------------- 3 files changed, 744 deletions(-) delete mode 100644 lib/tasks/convert.rake delete mode 100644 lib/tasks/statuses.rake diff --git a/.codeclimate.yml b/.codeclimate.yml index 3760d0042a..ec9b25820d 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -33,12 +33,10 @@ exclude_patterns: - "lib/gem_ext/" - "lib/tasks/api_log.rake" - "lib/tasks/bootstrap.rake" - - "lib/tasks/convert.rake" - "lib/tasks/db.rake" - "lib/tasks/documents.rake" - "lib/tasks/import.rake" - "lib/tasks/legal_doc.rake" - - "lib/tasks/statuses.rake" - "lib/tasks/whois.rake" - "spec/" - "test/" diff --git a/lib/tasks/convert.rake b/lib/tasks/convert.rake deleted file mode 100644 index 47e0ec7c2d..0000000000 --- a/lib/tasks/convert.rake +++ /dev/null @@ -1,117 +0,0 @@ -namespace :convert do - desc 'Convert punycodes to unicode' - task punycode: :environment do - start = Time.zone.now.to_f - puts "-----> Convert domain punycodes to unicode..." - count = 0 - Domain.find_each(:batch_size => 1000) do |x| - old_name = x.name - if old_name != SimpleIDN.to_unicode(x.name.strip.downcase) - x.update_column(:name, (SimpleIDN.to_unicode(x.name.strip.downcase))) - x.update_column(:name_puny, (SimpleIDN.to_ascii(x.name.strip.downcase))) - count += 1 - puts "Domain #{x.id} changed from #{old_name} to #{SimpleIDN.to_unicode(old_name)} " - end - end - puts "-----> all done in #{(Time.zone.now.to_f - start).round(2)} seconds. #{count} domains changed." - end - - desc 'Convert punycodes in history to unicode' - task history_punycode: :environment do - DomainVersion.find_each do |d| - if obj = d.object - obj["name"] = SimpleIDN.to_unicode(obj["name"]) - obj["name_puny"] = SimpleIDN.to_ascii(obj["name_puny"]) - d.object = obj - end - if (obj_c = d.object_changes).present? - obj_c["name"].map!{|e| e ? SimpleIDN.to_unicode(e) : e } if obj_c["name"] - obj_c["name_puny"].map!{|e| e ? SimpleIDN.to_ascii(e) : e } if obj_c["name_puny"] - d.object_changes = obj_c - end - d.save! - end - end - - - desc 'Contact Address Country Code Upcase' - task country_code_upcase: :environment do - count = 0 - Contact.find_each do |c| - if c.country_code.present? && c.country_code != c.country_code.upcase - c.country_code = c.country_code.upcase - c.update_columns(country_code: c.country_code.upcase) - - count +=1 - puts "#{count} contacts has been changed" if count % 1000 == 0 - end - end - puts "Contacts change has been finished. Starting ContactVersions" - - count = 0 - ContactVersion.find_each do |c| - if (if_object = (c.object && c.object["country_code"].present? && c.object["country_code"] != c.object["country_code"].upcase)) || - (if_changes = (c.object_changes && c.object_changes["country_code"].present? && c.object_changes["country_code"] != c.object_changes["country_code"].map{|e|e.try(:upcase)})) - - if if_object - h = c.object - h["country_code"] = h["country_code"].try(:upcase) - c.object = h - end - - if if_changes - h = c.object_changes - h["country_code"] = h["country_code"].map{|e|e.try(:upcase)} - c.object_changes = h - end - c.update_columns(object: c.object, object_changes: c.object_changes) - - count +=1 - puts "#{count} contact histories has been changed" if count % 1000 == 0 - end - end - end - - desc 'Convert nameservers hostname and hostname_puny' - task nameserves_hostname: :environment do - - start = Time.zone.now.to_f - count = 0 - puts '-----> Converting hostnames...' - - Nameserver.find_each(:batch_size => 1000) do |ns| - ns.hostname = SimpleIDN.to_unicode(ns.hostname) - ns.hostname_puny = SimpleIDN.to_ascii(ns.hostname_puny) - ns.save validate: false - count += 1 - puts "-----> Converted #{count} nameservers" if count % 1000 == 0 - end - puts "-----> Converted #{count} nameservers #{(Time.zone.now.to_f - start).round(2)} seconds" - - end - - desc 'Convert nameservers history hostname' - task nameserves_history_hostname: :environment do - - start = Time.zone.now.to_f - count = 0 - puts '-----> Converting hostnames history...' - - NameserverVersion.find_each do |ns| - if obj = ns.object - obj["hostname"] = SimpleIDN.to_unicode(obj["hostname"]) - ns.object = obj - end - - if (obj_c = ns.object_changes).present? - obj_c["name"].map!{|e| e ? SimpleIDN.to_unicode(e) : e } if obj_c["hostname"] - ns.object_changes = obj_c - end - count += 1 - ns.save! - end - puts "-----> Converted #{count} history rows #{(Time.zone.now.to_f - start).round(2)} seconds" - end - -end - diff --git a/lib/tasks/statuses.rake b/lib/tasks/statuses.rake deleted file mode 100644 index 61adf372d4..0000000000 --- a/lib/tasks/statuses.rake +++ /dev/null @@ -1,625 +0,0 @@ -desc 'Schema load for all databases: registry, api_log and whois' -task statuses: [:environment] do - statuses = { - 'ok': [ - ], - 'inactive': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'clientDeleteProhibited': [ - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'serverDeleteProhibited': [ - 'clientDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'clientHold': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'serverHold': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'clientRenewProhibited': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'pendingCreate', - 'pendingDelete', - 'pendingDeleteConfirmation', - 'pendingTransfer', - 'pendingUpdate', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'serverRenewProhibited': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'pendingCreate', - 'pendingDelete', - 'pendingDeleteConfirmation', - 'pendingTransfer', - 'pendingUpdate', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'clientTransferProhibited': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'pendingCreate', - 'pendingDelete', - 'pendingDeleteConfirmation', - 'pendingRenew', - 'pendingUpdate', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'serverTransferProhibited': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'pendingCreate', - 'pendingDelete', - 'pendingDeleteConfirmation', - 'pendingRenew', - 'pendingUpdate', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'clientUpdateProhibited': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'serverUpdateProhibited', - 'inactive', - 'pendingCreate', - 'pendingDelete', - 'pendingDeleteConfirmation', - 'pendingRenew', - 'pendingTransfer', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'serverUpdateProhibited': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'inactive', - 'pendingCreate', - 'pendingDelete', - 'pendingDeleteConfirmation', - 'pendingRenew', - 'pendingTransfer', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'pendingCreate': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'pendingDelete': [ - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'pendingDeleteConfirmation', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'pendingRenew': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - - ], - 'pendingTransfer': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'pendingUpdate': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'inactive', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'serverManualInzone': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'pendingCreate', - 'pendingDelete', - 'pendingDeleteConfirmation', - 'pendingRenew', - 'pendingTransfer', - 'pendingUpdate', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'serverRegistrantChangeProhibited': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'pendingCreate', - 'pendingDelete', - 'pendingDeleteConfirmation', - 'pendingRenew', - 'pendingTransfer', - 'pendingUpdate', - 'serverManualInzone', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'serverAdminChangeProhibited': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'pendingCreate', - 'pendingDelete', - 'pendingDeleteConfirmation', - 'pendingRenew', - 'pendingTransfer', - 'pendingUpdate', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'serverTechChangeProhibited': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'pendingCreate', - 'pendingDelete', - 'pendingDeleteConfirmation', - 'pendingRenew', - 'pendingTransfer', - 'pendingUpdate', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'serverForceDelete': [ - 'clientHold', - 'serverHold', - 'inactive', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'deleteCandidate', - 'expired' - ], - 'deleteCandidate': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'pendingCreate', - 'pendingDelete', - 'pendingDeleteConfirmation', - 'pendingRenew', - 'pendingTransfer', - 'pendingUpdate', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate', - 'expired' - ], - 'expired': [ - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientHold', - 'serverHold', - 'clientRenewProhibited', - 'serverRenewProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'inactive', - 'pendingCreate', - 'pendingDelete', - 'pendingDeleteConfirmation', - 'pendingRenew', - 'pendingTransfer', - 'pendingUpdate', - 'serverManualInzone', - 'serverRegistrantChangeProhibited', - 'serverAdminChangeProhibited', - 'serverTechChangeProhibited', - 'serverForceDelete', - 'deleteCandidate' - ] - } - - puts "\nDomain status can be with other statuses map\n" - puts "---------------------------------------------" - statuses.each do |s, _v| - puts "\n#{s} =>" - statuses[s].map { |u| puts " #{u}" } - puts - end - - contact_statuses = { - 'ok': [ - 'linked' - ], - 'linked': [ - 'ok' - ], - 'clientDeleteProhibited': [ - 'linked', - 'serverDeleteProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'pendingCreate', - 'pendingTransfer', - 'pendingUpdate' - ], - 'serverDeleteProhibited': [ - 'linked', - 'clientDeleteProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'pendingCreate', - 'pendingTransfer', - 'pendingUpdate' - ], - 'clientTransferProhibited': [ - 'linked', - 'serverDeleteProhibited', - 'clientDeleteProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'pendingCreate', - 'pendingDelete', - 'pendingUpdate' - ], - 'serverTransferProhibited': [ - 'linked', - 'serverDeleteProhibited', - 'clientDeleteProhibited', - 'clientTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited', - 'pendingCreate', - 'pendingDelete', - 'pendingUpdate' - ], - 'clientUpdateProhibited': [ - 'linked', - 'serverDeleteProhibited', - 'clientDeleteProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'serverUpdateProhibited', - 'pendingCreate', - 'pendingDelete', - 'pendingTransfer' - ], - 'serverUpdateProhibited': [ - 'linked', - 'serverDeleteProhibited', - 'clientDeleteProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'pendingCreate', - 'pendingDelete', - 'pendingTransfer' - ], - 'pendingCreate': [ - 'linked', - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited' - ], - 'pendingDelete': [ - 'linked', - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited' - ], - 'pendingTransfer': [ - 'linked', - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited' - ], - 'pendingUpdate': [ - 'linked', - 'clientDeleteProhibited', - 'serverDeleteProhibited', - 'clientTransferProhibited', - 'serverTransferProhibited', - 'clientUpdateProhibited', - 'serverUpdateProhibited' - ] - } - - puts "\n\nContact status can be with other statuses map\n" - puts "---------------------------------------------" - contact_statuses.each do |s, _v| - puts "\n#{s} =>" - contact_statuses[s].map { |u| puts " #{u}" } - puts - end -end From 74fed16dc6b65c8a3aa5148ac47c41bffff34184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20V=C3=B5hmar?= Date: Mon, 26 Aug 2019 17:18:43 +0300 Subject: [PATCH 07/15] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f11fd5701e..6b24940ce1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +26.08.2019 +* Introduced automatic payment processing using LHV Connect [#1232](https://github.com/internetee/registry/issues/1232) +* removed unused script [#1261](https://github.com/internetee/registry/pull/1261) +* removed unused factory [#1262](https://github.com/internetee/registry/pull/1262) +* removed unused seller_it columnt from invoices db table [#1264](https://github.com/internetee/registry/pull/1264) +* removed unused rakte tasks [#1268](https://github.com/internetee/registry/pull/1268) + 21.08.2019 * Nokogiri update to 1.10.4 (CVE-2019-5477) [#1266](https://github.com/internetee/registry/pull/1266) From 18e6f511aa91086c886a302f0bde71d30fbbc609 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Sun, 11 Aug 2019 23:11:26 +0300 Subject: [PATCH 08/15] Add db constraint --- app/models/invoice.rb | 2 +- ...5814_change_invoices_number_to_not_null.rb | 5 + db/structure.sql | 408 +++++++++--------- 3 files changed, 211 insertions(+), 204 deletions(-) create mode 100644 db/migrate/20190811195814_change_invoices_number_to_not_null.rb diff --git a/app/models/invoice.rb b/app/models/invoice.rb index 50453f61fc..cde439c706 100644 --- a/app/models/invoice.rb +++ b/app/models/invoice.rb @@ -35,7 +35,7 @@ class Invoice < ActiveRecord::Base attribute :vat_rate, ::Type::VATRate.new def set_invoice_number - last_no = Invoice.order(number: :desc).where('number IS NOT NULL').limit(1).pluck(:number).first + last_no = Invoice.order(number: :desc).limit(1).pluck(:number).first if last_no && last_no >= Setting.invoice_number_min.to_i self.number = last_no + 1 diff --git a/db/migrate/20190811195814_change_invoices_number_to_not_null.rb b/db/migrate/20190811195814_change_invoices_number_to_not_null.rb new file mode 100644 index 0000000000..122e27572a --- /dev/null +++ b/db/migrate/20190811195814_change_invoices_number_to_not_null.rb @@ -0,0 +1,5 @@ +class ChangeInvoicesNumberToNotNull < ActiveRecord::Migration + def change + change_column_null :invoices, :number, false + end +end diff --git a/db/structure.sql b/db/structure.sql index a3d9fb4816..14778b4d75 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -295,7 +295,7 @@ SET default_tablespace = ''; SET default_with_oids = false; -- --- Name: account_activities; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: account_activities; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.account_activities ( @@ -335,7 +335,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: -; Tablespace: -- CREATE TABLE public.accounts ( @@ -371,7 +371,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: -; Tablespace: -- CREATE TABLE public.actions ( @@ -403,7 +403,7 @@ ALTER SEQUENCE public.actions_id_seq OWNED BY public.actions.id; -- --- Name: auctions; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: auctions; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.auctions ( @@ -436,7 +436,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: -; Tablespace: -- CREATE TABLE public.bank_statements ( @@ -472,7 +472,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: -; Tablespace: -- CREATE TABLE public.bank_transactions ( @@ -516,7 +516,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: -; Tablespace: -- CREATE TABLE public.blocked_domains ( @@ -549,7 +549,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: -; Tablespace: -- CREATE TABLE public.certificates ( @@ -587,7 +587,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: -; Tablespace: -- CREATE TABLE public.contacts ( @@ -645,7 +645,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: -; Tablespace: -- CREATE TABLE public.directos ( @@ -680,7 +680,7 @@ ALTER SEQUENCE public.directos_id_seq OWNED BY public.directos.id; -- --- Name: dnskeys; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: dnskeys; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.dnskeys ( @@ -721,7 +721,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: -; Tablespace: -- CREATE TABLE public.domain_contacts ( @@ -759,7 +759,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: -; Tablespace: -- CREATE TABLE public.domain_transfers ( @@ -796,7 +796,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: -; Tablespace: -- CREATE TABLE public.domains ( @@ -854,7 +854,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: -; Tablespace: -- CREATE TABLE public.epp_sessions ( @@ -886,7 +886,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: -; Tablespace: -- CREATE TABLE public.invoice_items ( @@ -923,7 +923,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: -; Tablespace: -- CREATE TABLE public.invoices ( @@ -963,7 +963,7 @@ CREATE TABLE public.invoices ( buyer_email character varying, creator_str character varying, updator_str character varying, - number integer, + number integer NOT NULL, cancelled_at timestamp without time zone, total numeric(10,2) NOT NULL, in_directo boolean DEFAULT false, @@ -992,7 +992,7 @@ ALTER SEQUENCE public.invoices_id_seq OWNED BY public.invoices.id; -- --- Name: keyrelays; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: keyrelays; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.keyrelays ( @@ -1035,7 +1035,7 @@ ALTER SEQUENCE public.keyrelays_id_seq OWNED BY public.keyrelays.id; -- --- Name: legal_documents; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: legal_documents; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.legal_documents ( @@ -1070,7 +1070,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: -; Tablespace: -- CREATE TABLE public.log_account_activities ( @@ -1108,7 +1108,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: -; Tablespace: -- CREATE TABLE public.log_accounts ( @@ -1146,7 +1146,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: -; Tablespace: -- CREATE TABLE public.log_actions ( @@ -1184,7 +1184,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: -; Tablespace: -- CREATE TABLE public.log_bank_statements ( @@ -1222,7 +1222,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: -; Tablespace: -- CREATE TABLE public.log_bank_transactions ( @@ -1260,7 +1260,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: -; Tablespace: -- CREATE TABLE public.log_blocked_domains ( @@ -1298,7 +1298,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: -; Tablespace: -- CREATE TABLE public.log_certificates ( @@ -1336,7 +1336,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: -; Tablespace: -- CREATE TABLE public.log_contacts ( @@ -1375,7 +1375,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: -; Tablespace: -- CREATE TABLE public.log_dnskeys ( @@ -1413,7 +1413,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: -; Tablespace: -- CREATE TABLE public.log_domain_contacts ( @@ -1451,7 +1451,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: -; Tablespace: -- CREATE TABLE public.log_domains ( @@ -1489,7 +1489,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: -; Tablespace: -- CREATE TABLE public.log_invoice_items ( @@ -1527,7 +1527,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: -; Tablespace: -- CREATE TABLE public.log_invoices ( @@ -1565,7 +1565,7 @@ ALTER SEQUENCE public.log_invoices_id_seq OWNED BY public.log_invoices.id; -- --- Name: log_keyrelays; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_keyrelays; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.log_keyrelays ( @@ -1603,7 +1603,7 @@ ALTER SEQUENCE public.log_keyrelays_id_seq OWNED BY public.log_keyrelays.id; -- --- Name: log_nameservers; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_nameservers; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.log_nameservers ( @@ -1641,7 +1641,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: -; Tablespace: -- CREATE TABLE public.log_notifications ( @@ -1679,7 +1679,7 @@ ALTER SEQUENCE public.log_notifications_id_seq OWNED BY public.log_notifications -- --- Name: log_registrars; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_registrars; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.log_registrars ( @@ -1717,7 +1717,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: -; Tablespace: -- CREATE TABLE public.log_reserved_domains ( @@ -1755,7 +1755,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: -; Tablespace: -- CREATE TABLE public.log_settings ( @@ -1793,7 +1793,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: -; Tablespace: -- CREATE TABLE public.log_users ( @@ -1831,7 +1831,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: -; Tablespace: -- CREATE TABLE public.log_white_ips ( @@ -1869,7 +1869,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: -; Tablespace: -- CREATE TABLE public.nameservers ( @@ -1907,7 +1907,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: -; Tablespace: -- CREATE TABLE public.notifications ( @@ -1945,7 +1945,7 @@ ALTER SEQUENCE public.notifications_id_seq OWNED BY public.notifications.id; -- --- Name: prices; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: prices; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.prices ( @@ -1983,7 +1983,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: -; Tablespace: -- CREATE TABLE public.que_jobs ( @@ -2025,7 +2025,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: -; Tablespace: -- CREATE TABLE public.registrant_verifications ( @@ -2060,7 +2060,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: -; Tablespace: -- CREATE TABLE public.registrars ( @@ -2113,7 +2113,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: -; Tablespace: -- CREATE TABLE public.reserved_domains ( @@ -2148,7 +2148,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: -; Tablespace: -- CREATE TABLE public.schema_migrations ( @@ -2157,7 +2157,7 @@ CREATE TABLE public.schema_migrations ( -- --- Name: settings; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: settings; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.settings ( @@ -2193,7 +2193,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: -; Tablespace: -- CREATE TABLE public.users ( @@ -2247,7 +2247,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: -; Tablespace: -- CREATE TABLE public.versions ( @@ -2282,7 +2282,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: -; Tablespace: -- CREATE TABLE public.white_ips ( @@ -2318,7 +2318,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: -; Tablespace: -- CREATE TABLE public.whois_records ( @@ -2353,7 +2353,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: -; Tablespace: -- CREATE TABLE public.zones ( @@ -2767,7 +2767,7 @@ ALTER TABLE ONLY public.zones ALTER COLUMN id SET DEFAULT nextval('public.zones_ -- --- Name: account_activities_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: account_activities_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.account_activities @@ -2775,7 +2775,7 @@ ALTER TABLE ONLY public.account_activities -- --- Name: accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.accounts @@ -2783,7 +2783,7 @@ ALTER TABLE ONLY public.accounts -- --- Name: actions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: actions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.actions @@ -2791,7 +2791,7 @@ ALTER TABLE ONLY public.actions -- --- Name: auctions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: auctions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.auctions @@ -2799,7 +2799,7 @@ ALTER TABLE ONLY public.auctions -- --- Name: bank_statements_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: bank_statements_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.bank_statements @@ -2807,7 +2807,7 @@ ALTER TABLE ONLY public.bank_statements -- --- Name: bank_transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: bank_transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.bank_transactions @@ -2815,7 +2815,7 @@ ALTER TABLE ONLY public.bank_transactions -- --- Name: blocked_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: blocked_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.blocked_domains @@ -2823,7 +2823,7 @@ ALTER TABLE ONLY public.blocked_domains -- --- Name: certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.certificates @@ -2831,7 +2831,7 @@ ALTER TABLE ONLY public.certificates -- --- Name: contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.contacts @@ -2839,7 +2839,7 @@ ALTER TABLE ONLY public.contacts -- --- Name: directos_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: directos_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.directos @@ -2847,7 +2847,7 @@ ALTER TABLE ONLY public.directos -- --- Name: dnskeys_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: dnskeys_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.dnskeys @@ -2855,7 +2855,7 @@ ALTER TABLE ONLY public.dnskeys -- --- Name: domain_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: domain_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.domain_contacts @@ -2863,7 +2863,7 @@ ALTER TABLE ONLY public.domain_contacts -- --- Name: domain_transfers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: domain_transfers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.domain_transfers @@ -2871,7 +2871,7 @@ ALTER TABLE ONLY public.domain_transfers -- --- Name: domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.domains @@ -2879,7 +2879,7 @@ ALTER TABLE ONLY public.domains -- --- Name: epp_sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: epp_sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.epp_sessions @@ -2887,7 +2887,7 @@ ALTER TABLE ONLY public.epp_sessions -- --- Name: invoice_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: invoice_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.invoice_items @@ -2895,7 +2895,7 @@ ALTER TABLE ONLY public.invoice_items -- --- Name: invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.invoices @@ -2903,7 +2903,7 @@ ALTER TABLE ONLY public.invoices -- --- Name: keyrelays_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: keyrelays_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.keyrelays @@ -2911,7 +2911,7 @@ ALTER TABLE ONLY public.keyrelays -- --- Name: legal_documents_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: legal_documents_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.legal_documents @@ -2919,7 +2919,7 @@ ALTER TABLE ONLY public.legal_documents -- --- Name: log_account_activities_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_account_activities_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_account_activities @@ -2927,7 +2927,7 @@ ALTER TABLE ONLY public.log_account_activities -- --- Name: log_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_accounts @@ -2935,7 +2935,7 @@ ALTER TABLE ONLY public.log_accounts -- --- Name: log_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_actions @@ -2943,7 +2943,7 @@ ALTER TABLE ONLY public.log_actions -- --- Name: log_bank_statements_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_bank_statements_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_bank_statements @@ -2951,7 +2951,7 @@ ALTER TABLE ONLY public.log_bank_statements -- --- Name: log_bank_transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_bank_transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_bank_transactions @@ -2959,7 +2959,7 @@ ALTER TABLE ONLY public.log_bank_transactions -- --- Name: log_blocked_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_blocked_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_blocked_domains @@ -2967,7 +2967,7 @@ ALTER TABLE ONLY public.log_blocked_domains -- --- Name: log_certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_certificates @@ -2975,7 +2975,7 @@ ALTER TABLE ONLY public.log_certificates -- --- Name: log_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_contacts @@ -2983,7 +2983,7 @@ ALTER TABLE ONLY public.log_contacts -- --- Name: log_dnskeys_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_dnskeys_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_dnskeys @@ -2991,7 +2991,7 @@ ALTER TABLE ONLY public.log_dnskeys -- --- Name: log_domain_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_domain_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_domain_contacts @@ -2999,7 +2999,7 @@ ALTER TABLE ONLY public.log_domain_contacts -- --- Name: log_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_domains @@ -3007,7 +3007,7 @@ ALTER TABLE ONLY public.log_domains -- --- Name: log_invoice_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_invoice_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_invoice_items @@ -3015,7 +3015,7 @@ ALTER TABLE ONLY public.log_invoice_items -- --- Name: log_invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_invoices @@ -3023,7 +3023,7 @@ ALTER TABLE ONLY public.log_invoices -- --- Name: log_keyrelays_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_keyrelays_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_keyrelays @@ -3031,7 +3031,7 @@ ALTER TABLE ONLY public.log_keyrelays -- --- Name: log_nameservers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_nameservers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_nameservers @@ -3039,7 +3039,7 @@ ALTER TABLE ONLY public.log_nameservers -- --- Name: log_notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_notifications @@ -3047,7 +3047,7 @@ ALTER TABLE ONLY public.log_notifications -- --- Name: log_registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_registrars @@ -3055,7 +3055,7 @@ ALTER TABLE ONLY public.log_registrars -- --- Name: log_reserved_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_reserved_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_reserved_domains @@ -3063,7 +3063,7 @@ ALTER TABLE ONLY public.log_reserved_domains -- --- Name: log_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_settings @@ -3071,7 +3071,7 @@ ALTER TABLE ONLY public.log_settings -- --- Name: log_users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_users @@ -3079,7 +3079,7 @@ ALTER TABLE ONLY public.log_users -- --- Name: log_white_ips_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_white_ips_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_white_ips @@ -3087,7 +3087,7 @@ ALTER TABLE ONLY public.log_white_ips -- --- Name: nameservers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: nameservers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.nameservers @@ -3095,7 +3095,7 @@ ALTER TABLE ONLY public.nameservers -- --- Name: notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.notifications @@ -3103,7 +3103,7 @@ ALTER TABLE ONLY public.notifications -- --- Name: prices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: prices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.prices @@ -3111,7 +3111,7 @@ ALTER TABLE ONLY public.prices -- --- Name: que_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: que_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.que_jobs @@ -3119,7 +3119,7 @@ ALTER TABLE ONLY public.que_jobs -- --- Name: registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.registrant_verifications @@ -3127,7 +3127,7 @@ ALTER TABLE ONLY public.registrant_verifications -- --- Name: registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.registrars @@ -3135,7 +3135,7 @@ ALTER TABLE ONLY public.registrars -- --- Name: reserved_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: reserved_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.reserved_domains @@ -3143,7 +3143,7 @@ ALTER TABLE ONLY public.reserved_domains -- --- Name: settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.settings @@ -3151,7 +3151,7 @@ ALTER TABLE ONLY public.settings -- --- Name: uniq_contact_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: uniq_contact_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.contacts @@ -3159,7 +3159,7 @@ ALTER TABLE ONLY public.contacts -- --- Name: uniq_domain_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: uniq_domain_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.domains @@ -3167,7 +3167,7 @@ ALTER TABLE ONLY public.domains -- --- Name: uniq_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: uniq_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.auctions @@ -3175,7 +3175,7 @@ ALTER TABLE ONLY public.auctions -- --- Name: unique_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: unique_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.registrars @@ -3183,7 +3183,7 @@ ALTER TABLE ONLY public.registrars -- --- Name: unique_contact_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: unique_contact_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.contacts @@ -3191,7 +3191,7 @@ ALTER TABLE ONLY public.contacts -- --- Name: unique_name; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: unique_name; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.registrars @@ -3199,7 +3199,7 @@ ALTER TABLE ONLY public.registrars -- --- Name: unique_reference_no; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: unique_reference_no; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.registrars @@ -3207,7 +3207,7 @@ ALTER TABLE ONLY public.registrars -- --- Name: unique_registration_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: unique_registration_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.auctions @@ -3215,7 +3215,7 @@ ALTER TABLE ONLY public.auctions -- --- Name: unique_session_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: unique_session_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.epp_sessions @@ -3223,7 +3223,7 @@ ALTER TABLE ONLY public.epp_sessions -- --- Name: unique_zone_origin; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: unique_zone_origin; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.zones @@ -3231,7 +3231,7 @@ ALTER TABLE ONLY public.zones -- --- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.users @@ -3239,7 +3239,7 @@ ALTER TABLE ONLY public.users -- --- Name: versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.versions @@ -3247,7 +3247,7 @@ ALTER TABLE ONLY public.versions -- --- Name: white_ips_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: white_ips_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.white_ips @@ -3255,7 +3255,7 @@ ALTER TABLE ONLY public.white_ips -- --- Name: whois_records_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: whois_records_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.whois_records @@ -3263,7 +3263,7 @@ ALTER TABLE ONLY public.whois_records -- --- Name: zones_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: zones_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.zones @@ -3271,595 +3271,595 @@ ALTER TABLE ONLY public.zones -- --- Name: index_account_activities_on_account_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_account_activities_on_account_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- CREATE INDEX index_accounts_on_registrar_id ON public.accounts USING btree (registrar_id); -- --- Name: index_blocked_domains_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_blocked_domains_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_blocked_domains_on_name ON public.blocked_domains USING btree (name); -- --- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- CREATE INDEX index_invoices_on_buyer_id ON public.invoices USING btree (buyer_id); -- --- Name: index_keyrelays_on_accepter_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_keyrelays_on_accepter_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_keyrelays_on_accepter_id ON public.keyrelays USING btree (accepter_id); -- --- Name: index_keyrelays_on_domain_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_keyrelays_on_domain_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_keyrelays_on_domain_id ON public.keyrelays USING btree (domain_id); -- --- Name: index_keyrelays_on_requester_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_keyrelays_on_requester_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_keyrelays_on_requester_id ON public.keyrelays USING btree (requester_id); -- --- Name: index_legal_documents_on_checksum; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_legal_documents_on_checksum; Type: INDEX; Schema: public; Owner: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- CREATE INDEX index_log_invoices_on_whodunnit ON public.log_invoices USING btree (whodunnit); -- --- Name: index_log_keyrelays_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_keyrelays_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_log_keyrelays_on_item_type_and_item_id ON public.log_keyrelays USING btree (item_type, item_id); -- --- Name: index_log_keyrelays_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_keyrelays_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_log_keyrelays_on_whodunnit ON public.log_keyrelays 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- CREATE INDEX index_log_notifications_on_whodunnit ON public.log_notifications 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- CREATE INDEX index_notifications_on_registrar_id ON public.notifications USING btree (registrar_id); -- --- Name: index_prices_on_zone_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_prices_on_zone_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- CREATE UNIQUE INDEX unique_schema_migrations ON public.schema_migrations USING btree (version); @@ -4811,3 +4811,5 @@ INSERT INTO schema_migrations (version) VALUES ('20190620084334'); INSERT INTO schema_migrations (version) VALUES ('20190811184334'); +INSERT INTO schema_migrations (version) VALUES ('20190811195814'); + From f1b37853b9f773e1a75d671a6ad450c2cb8edc1d Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Sun, 11 Aug 2019 23:21:50 +0300 Subject: [PATCH 09/15] AddInvoicesNumberUniqConstraint --- ...811202042_add_invoices_number_uniq_constraint.rb | 13 +++++++++++++ db/structure.sql | 10 ++++++++++ 2 files changed, 23 insertions(+) create mode 100644 db/migrate/20190811202042_add_invoices_number_uniq_constraint.rb diff --git a/db/migrate/20190811202042_add_invoices_number_uniq_constraint.rb b/db/migrate/20190811202042_add_invoices_number_uniq_constraint.rb new file mode 100644 index 0000000000..4232143556 --- /dev/null +++ b/db/migrate/20190811202042_add_invoices_number_uniq_constraint.rb @@ -0,0 +1,13 @@ +class AddInvoicesNumberUniqConstraint < ActiveRecord::Migration + def up + execute <<-SQL + ALTER TABLE invoices ADD CONSTRAINT unique_number UNIQUE (number) + SQL + end + + def down + execute <<-SQL + ALTER TABLE invoices DROP CONSTRAINT unique_number + SQL + end +end diff --git a/db/structure.sql b/db/structure.sql index 14778b4d75..09925eac5e 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -3198,6 +3198,14 @@ ALTER TABLE ONLY public.registrars ADD CONSTRAINT unique_name UNIQUE (name); +-- +-- Name: unique_number; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- + +ALTER TABLE ONLY public.invoices + ADD CONSTRAINT unique_number UNIQUE (number); + + -- -- Name: unique_reference_no; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- @@ -4813,3 +4821,5 @@ INSERT INTO schema_migrations (version) VALUES ('20190811184334'); INSERT INTO schema_migrations (version) VALUES ('20190811195814'); +INSERT INTO schema_migrations (version) VALUES ('20190811202042'); + From b177b3eab2253e95fee122db84c375ee6bcb7b06 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Sun, 11 Aug 2019 23:24:34 +0300 Subject: [PATCH 10/15] AddInvoicesBuyerIdFk --- db/migrate/20190811202347_add_invoices_buyer_id_fk.rb | 5 +++++ db/structure.sql | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 db/migrate/20190811202347_add_invoices_buyer_id_fk.rb diff --git a/db/migrate/20190811202347_add_invoices_buyer_id_fk.rb b/db/migrate/20190811202347_add_invoices_buyer_id_fk.rb new file mode 100644 index 0000000000..de2a82fcd6 --- /dev/null +++ b/db/migrate/20190811202347_add_invoices_buyer_id_fk.rb @@ -0,0 +1,5 @@ +class AddInvoicesBuyerIdFk < ActiveRecord::Migration + def change + add_foreign_key :invoices, :registrars, column: :buyer_id + end +end diff --git a/db/structure.sql b/db/structure.sql index 09925eac5e..0e122c441d 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -3913,6 +3913,14 @@ ALTER TABLE ONLY public.domains ADD CONSTRAINT domains_registrar_id_fk FOREIGN KEY (registrar_id) REFERENCES public.registrars(id); +-- +-- Name: fk_rails_242b91538b; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.invoices + ADD CONSTRAINT fk_rails_242b91538b FOREIGN KEY (buyer_id) REFERENCES public.registrars(id); + + -- -- Name: fk_rails_59c422f73d; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -4823,3 +4831,5 @@ INSERT INTO schema_migrations (version) VALUES ('20190811195814'); INSERT INTO schema_migrations (version) VALUES ('20190811202042'); +INSERT INTO schema_migrations (version) VALUES ('20190811202347'); + From 98e662b003dea36a2526752031820a608231bf06 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Sun, 11 Aug 2019 23:43:49 +0300 Subject: [PATCH 11/15] ChangeInvoicesRequiredColumnsToNotNull --- ...e_invoices_required_columns_to_not_null.rb | 15 ++++++++++++ db/structure.sql | 24 ++++++++++--------- test/fixtures/invoices.yml | 12 +++++++++- 3 files changed, 39 insertions(+), 12 deletions(-) create mode 100644 db/migrate/20190811202711_change_invoices_required_columns_to_not_null.rb diff --git a/db/migrate/20190811202711_change_invoices_required_columns_to_not_null.rb b/db/migrate/20190811202711_change_invoices_required_columns_to_not_null.rb new file mode 100644 index 0000000000..fc8f0f895a --- /dev/null +++ b/db/migrate/20190811202711_change_invoices_required_columns_to_not_null.rb @@ -0,0 +1,15 @@ +class ChangeInvoicesRequiredColumnsToNotNull < ActiveRecord::Migration + def change + change_column_null :invoices, :buyer_id, false + change_column_null :invoices, :seller_reg_no, false + change_column_null :invoices, :seller_bank, false + change_column_null :invoices, :seller_swift, false + change_column_null :invoices, :seller_country_code, false + change_column_null :invoices, :seller_street, false + change_column_null :invoices, :seller_city, false + change_column_null :invoices, :buyer_reg_no, false + change_column_null :invoices, :buyer_country_code, false + change_column_null :invoices, :buyer_street, false + change_column_null :invoices, :buyer_city, false + end +end diff --git a/db/structure.sql b/db/structure.sql index 0e122c441d..ccc2530076 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -936,27 +936,27 @@ CREATE TABLE public.invoices ( reference_no character varying NOT NULL, vat_rate numeric(4,3) NOT NULL, seller_name character varying NOT NULL, - seller_reg_no character varying, + seller_reg_no character varying NOT NULL, seller_iban character varying NOT NULL, - seller_bank character varying, - seller_swift character varying, + seller_bank character varying NOT NULL, + seller_swift character varying NOT NULL, seller_vat_no character varying, - seller_country_code character varying, + seller_country_code character varying NOT NULL, seller_state character varying, - seller_street character varying, - seller_city character varying, + seller_street character varying NOT NULL, + seller_city character varying NOT NULL, seller_zip character varying, seller_phone character varying, seller_url character varying, seller_email character varying, seller_contact_name character varying, - buyer_id integer, + buyer_id integer NOT NULL, buyer_name character varying NOT NULL, - buyer_reg_no character varying, - buyer_country_code character varying, + buyer_reg_no character varying NOT NULL, + buyer_country_code character varying NOT NULL, buyer_state character varying, - buyer_street character varying, - buyer_city character varying, + buyer_street character varying NOT NULL, + buyer_city character varying NOT NULL, buyer_zip character varying, buyer_phone character varying, buyer_url character varying, @@ -4833,3 +4833,5 @@ INSERT INTO schema_migrations (version) VALUES ('20190811202042'); INSERT INTO schema_migrations (version) VALUES ('20190811202347'); +INSERT INTO schema_migrations (version) VALUES ('20190811202711'); + diff --git a/test/fixtures/invoices.yml b/test/fixtures/invoices.yml index c3e3bac797..7c6be1afd6 100644 --- a/test/fixtures/invoices.yml +++ b/test/fixtures/invoices.yml @@ -3,9 +3,19 @@ one: due_date: <%= Date.parse '2010-07-06' %> currency: EUR seller_name: Seller Ltd - seller_iban: US75512108001245126199 + seller_reg_no: 1234 + seller_iban: iban + seller_bank: Main Bank + seller_swift: swift + seller_country_code: US + seller_street: Main Street 1 + seller_city: New York buyer: bestnames buyer_name: Buyer Ltd + buyer_reg_no: 12345 + buyer_country_code: GB + buyer_street: Main Street 2 + buyer_city: London vat_rate: 0.1 total: 16.50 reference_no: 13 From 3be20eeec2150f1bd17005687cba794eae80dadd Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Mon, 12 Aug 2019 00:05:07 +0300 Subject: [PATCH 12/15] Fix fixtures --- test/fixtures/invoices.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fixtures/invoices.yml b/test/fixtures/invoices.yml index 7c6be1afd6..e154b50d61 100644 --- a/test/fixtures/invoices.yml +++ b/test/fixtures/invoices.yml @@ -4,7 +4,7 @@ one: currency: EUR seller_name: Seller Ltd seller_reg_no: 1234 - seller_iban: iban + seller_iban: US75512108001245126199 seller_bank: Main Bank seller_swift: swift seller_country_code: US From 13ff0b1183b5a3cba1a5954178fed61684ad6223 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Mon, 12 Aug 2019 00:05:21 +0300 Subject: [PATCH 13/15] ChangeInvoicesRequiredColumnsToNotNullPart2 --- ..._change_invoices_required_columns_to_not_null_part2.rb | 7 +++++++ db/structure.sql | 8 +++++--- test/fixtures/invoices.yml | 3 +++ 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20190811205406_change_invoices_required_columns_to_not_null_part2.rb diff --git a/db/migrate/20190811205406_change_invoices_required_columns_to_not_null_part2.rb b/db/migrate/20190811205406_change_invoices_required_columns_to_not_null_part2.rb new file mode 100644 index 0000000000..57e9d7d9bd --- /dev/null +++ b/db/migrate/20190811205406_change_invoices_required_columns_to_not_null_part2.rb @@ -0,0 +1,7 @@ +class ChangeInvoicesRequiredColumnsToNotNullPart2 < ActiveRecord::Migration + def change + change_column_null :invoices, :seller_email, false + change_column_null :invoices, :seller_contact_name, false + change_column_null :invoices, :buyer_email, false + end +end diff --git a/db/structure.sql b/db/structure.sql index ccc2530076..c134253b0f 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -948,8 +948,8 @@ CREATE TABLE public.invoices ( seller_zip character varying, seller_phone character varying, seller_url character varying, - seller_email character varying, - seller_contact_name character varying, + seller_email character varying NOT NULL, + seller_contact_name character varying NOT NULL, buyer_id integer NOT NULL, buyer_name character varying NOT NULL, buyer_reg_no character varying NOT NULL, @@ -960,7 +960,7 @@ CREATE TABLE public.invoices ( buyer_zip character varying, buyer_phone character varying, buyer_url character varying, - buyer_email character varying, + buyer_email character varying NOT NULL, creator_str character varying, updator_str character varying, number integer NOT NULL, @@ -4835,3 +4835,5 @@ INSERT INTO schema_migrations (version) VALUES ('20190811202347'); INSERT INTO schema_migrations (version) VALUES ('20190811202711'); +INSERT INTO schema_migrations (version) VALUES ('20190811205406'); + diff --git a/test/fixtures/invoices.yml b/test/fixtures/invoices.yml index e154b50d61..3fe18b4b2b 100644 --- a/test/fixtures/invoices.yml +++ b/test/fixtures/invoices.yml @@ -7,12 +7,15 @@ one: seller_iban: US75512108001245126199 seller_bank: Main Bank seller_swift: swift + seller_email: info@seller.test seller_country_code: US seller_street: Main Street 1 seller_city: New York + seller_contact_name: John Doe buyer: bestnames buyer_name: Buyer Ltd buyer_reg_no: 12345 + buyer_email: info@buyer.test buyer_country_code: GB buyer_street: Main Street 2 buyer_city: London From df0e9f2c40d6d40b3507363c1a2277e52270f45b Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Mon, 26 Aug 2019 17:56:22 +0300 Subject: [PATCH 14/15] Regenerate SQL --- db/structure.sql | 406 +++++++++++++++++++++++------------------------ 1 file changed, 203 insertions(+), 203 deletions(-) diff --git a/db/structure.sql b/db/structure.sql index c134253b0f..0dcb196439 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -295,7 +295,7 @@ SET default_tablespace = ''; SET default_with_oids = false; -- --- Name: account_activities; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: account_activities; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.account_activities ( @@ -335,7 +335,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: -; Tablespace: -- CREATE TABLE public.accounts ( @@ -371,7 +371,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: -; Tablespace: -- CREATE TABLE public.actions ( @@ -403,7 +403,7 @@ ALTER SEQUENCE public.actions_id_seq OWNED BY public.actions.id; -- --- Name: auctions; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: auctions; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.auctions ( @@ -436,7 +436,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: -; Tablespace: -- CREATE TABLE public.bank_statements ( @@ -472,7 +472,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: -; Tablespace: -- CREATE TABLE public.bank_transactions ( @@ -516,7 +516,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: -; Tablespace: -- CREATE TABLE public.blocked_domains ( @@ -549,7 +549,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: -; Tablespace: -- CREATE TABLE public.certificates ( @@ -587,7 +587,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: -; Tablespace: -- CREATE TABLE public.contacts ( @@ -645,7 +645,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: -; Tablespace: -- CREATE TABLE public.directos ( @@ -680,7 +680,7 @@ ALTER SEQUENCE public.directos_id_seq OWNED BY public.directos.id; -- --- Name: dnskeys; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: dnskeys; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.dnskeys ( @@ -721,7 +721,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: -; Tablespace: -- CREATE TABLE public.domain_contacts ( @@ -759,7 +759,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: -; Tablespace: -- CREATE TABLE public.domain_transfers ( @@ -796,7 +796,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: -; Tablespace: -- CREATE TABLE public.domains ( @@ -854,7 +854,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: -; Tablespace: -- CREATE TABLE public.epp_sessions ( @@ -886,7 +886,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: -; Tablespace: -- CREATE TABLE public.invoice_items ( @@ -923,7 +923,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: -; Tablespace: -- CREATE TABLE public.invoices ( @@ -992,7 +992,7 @@ ALTER SEQUENCE public.invoices_id_seq OWNED BY public.invoices.id; -- --- Name: keyrelays; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: keyrelays; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.keyrelays ( @@ -1035,7 +1035,7 @@ ALTER SEQUENCE public.keyrelays_id_seq OWNED BY public.keyrelays.id; -- --- Name: legal_documents; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: legal_documents; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.legal_documents ( @@ -1070,7 +1070,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: -; Tablespace: -- CREATE TABLE public.log_account_activities ( @@ -1108,7 +1108,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: -; Tablespace: -- CREATE TABLE public.log_accounts ( @@ -1146,7 +1146,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: -; Tablespace: -- CREATE TABLE public.log_actions ( @@ -1184,7 +1184,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: -; Tablespace: -- CREATE TABLE public.log_bank_statements ( @@ -1222,7 +1222,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: -; Tablespace: -- CREATE TABLE public.log_bank_transactions ( @@ -1260,7 +1260,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: -; Tablespace: -- CREATE TABLE public.log_blocked_domains ( @@ -1298,7 +1298,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: -; Tablespace: -- CREATE TABLE public.log_certificates ( @@ -1336,7 +1336,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: -; Tablespace: -- CREATE TABLE public.log_contacts ( @@ -1375,7 +1375,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: -; Tablespace: -- CREATE TABLE public.log_dnskeys ( @@ -1413,7 +1413,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: -; Tablespace: -- CREATE TABLE public.log_domain_contacts ( @@ -1451,7 +1451,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: -; Tablespace: -- CREATE TABLE public.log_domains ( @@ -1489,7 +1489,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: -; Tablespace: -- CREATE TABLE public.log_invoice_items ( @@ -1527,7 +1527,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: -; Tablespace: -- CREATE TABLE public.log_invoices ( @@ -1565,7 +1565,7 @@ ALTER SEQUENCE public.log_invoices_id_seq OWNED BY public.log_invoices.id; -- --- Name: log_keyrelays; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_keyrelays; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.log_keyrelays ( @@ -1603,7 +1603,7 @@ ALTER SEQUENCE public.log_keyrelays_id_seq OWNED BY public.log_keyrelays.id; -- --- Name: log_nameservers; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_nameservers; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.log_nameservers ( @@ -1641,7 +1641,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: -; Tablespace: -- CREATE TABLE public.log_notifications ( @@ -1679,7 +1679,7 @@ ALTER SEQUENCE public.log_notifications_id_seq OWNED BY public.log_notifications -- --- Name: log_registrars; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: log_registrars; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.log_registrars ( @@ -1717,7 +1717,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: -; Tablespace: -- CREATE TABLE public.log_reserved_domains ( @@ -1755,7 +1755,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: -; Tablespace: -- CREATE TABLE public.log_settings ( @@ -1793,7 +1793,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: -; Tablespace: -- CREATE TABLE public.log_users ( @@ -1831,7 +1831,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: -; Tablespace: -- CREATE TABLE public.log_white_ips ( @@ -1869,7 +1869,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: -; Tablespace: -- CREATE TABLE public.nameservers ( @@ -1907,7 +1907,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: -; Tablespace: -- CREATE TABLE public.notifications ( @@ -1945,7 +1945,7 @@ ALTER SEQUENCE public.notifications_id_seq OWNED BY public.notifications.id; -- --- Name: prices; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: prices; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.prices ( @@ -1983,7 +1983,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: -; Tablespace: -- CREATE TABLE public.que_jobs ( @@ -2025,7 +2025,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: -; Tablespace: -- CREATE TABLE public.registrant_verifications ( @@ -2060,7 +2060,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: -; Tablespace: -- CREATE TABLE public.registrars ( @@ -2113,7 +2113,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: -; Tablespace: -- CREATE TABLE public.reserved_domains ( @@ -2148,7 +2148,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: -; Tablespace: -- CREATE TABLE public.schema_migrations ( @@ -2157,7 +2157,7 @@ CREATE TABLE public.schema_migrations ( -- --- Name: settings; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: settings; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE public.settings ( @@ -2193,7 +2193,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: -; Tablespace: -- CREATE TABLE public.users ( @@ -2247,7 +2247,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: -; Tablespace: -- CREATE TABLE public.versions ( @@ -2282,7 +2282,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: -; Tablespace: -- CREATE TABLE public.white_ips ( @@ -2318,7 +2318,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: -; Tablespace: -- CREATE TABLE public.whois_records ( @@ -2353,7 +2353,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: -; Tablespace: -- CREATE TABLE public.zones ( @@ -2767,7 +2767,7 @@ ALTER TABLE ONLY public.zones ALTER COLUMN id SET DEFAULT nextval('public.zones_ -- --- Name: account_activities_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: account_activities_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.account_activities @@ -2775,7 +2775,7 @@ ALTER TABLE ONLY public.account_activities -- --- Name: accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.accounts @@ -2783,7 +2783,7 @@ ALTER TABLE ONLY public.accounts -- --- Name: actions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: actions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.actions @@ -2791,7 +2791,7 @@ ALTER TABLE ONLY public.actions -- --- Name: auctions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: auctions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.auctions @@ -2799,7 +2799,7 @@ ALTER TABLE ONLY public.auctions -- --- Name: bank_statements_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: bank_statements_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.bank_statements @@ -2807,7 +2807,7 @@ ALTER TABLE ONLY public.bank_statements -- --- Name: bank_transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: bank_transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.bank_transactions @@ -2815,7 +2815,7 @@ ALTER TABLE ONLY public.bank_transactions -- --- Name: blocked_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: blocked_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.blocked_domains @@ -2823,7 +2823,7 @@ ALTER TABLE ONLY public.blocked_domains -- --- Name: certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.certificates @@ -2831,7 +2831,7 @@ ALTER TABLE ONLY public.certificates -- --- Name: contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.contacts @@ -2839,7 +2839,7 @@ ALTER TABLE ONLY public.contacts -- --- Name: directos_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: directos_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.directos @@ -2847,7 +2847,7 @@ ALTER TABLE ONLY public.directos -- --- Name: dnskeys_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: dnskeys_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.dnskeys @@ -2855,7 +2855,7 @@ ALTER TABLE ONLY public.dnskeys -- --- Name: domain_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: domain_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.domain_contacts @@ -2863,7 +2863,7 @@ ALTER TABLE ONLY public.domain_contacts -- --- Name: domain_transfers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: domain_transfers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.domain_transfers @@ -2871,7 +2871,7 @@ ALTER TABLE ONLY public.domain_transfers -- --- Name: domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.domains @@ -2879,7 +2879,7 @@ ALTER TABLE ONLY public.domains -- --- Name: epp_sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: epp_sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.epp_sessions @@ -2887,7 +2887,7 @@ ALTER TABLE ONLY public.epp_sessions -- --- Name: invoice_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: invoice_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.invoice_items @@ -2895,7 +2895,7 @@ ALTER TABLE ONLY public.invoice_items -- --- Name: invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.invoices @@ -2903,7 +2903,7 @@ ALTER TABLE ONLY public.invoices -- --- Name: keyrelays_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: keyrelays_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.keyrelays @@ -2911,7 +2911,7 @@ ALTER TABLE ONLY public.keyrelays -- --- Name: legal_documents_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: legal_documents_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.legal_documents @@ -2919,7 +2919,7 @@ ALTER TABLE ONLY public.legal_documents -- --- Name: log_account_activities_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_account_activities_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_account_activities @@ -2927,7 +2927,7 @@ ALTER TABLE ONLY public.log_account_activities -- --- Name: log_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_accounts @@ -2935,7 +2935,7 @@ ALTER TABLE ONLY public.log_accounts -- --- Name: log_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_actions @@ -2943,7 +2943,7 @@ ALTER TABLE ONLY public.log_actions -- --- Name: log_bank_statements_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_bank_statements_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_bank_statements @@ -2951,7 +2951,7 @@ ALTER TABLE ONLY public.log_bank_statements -- --- Name: log_bank_transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_bank_transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_bank_transactions @@ -2959,7 +2959,7 @@ ALTER TABLE ONLY public.log_bank_transactions -- --- Name: log_blocked_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_blocked_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_blocked_domains @@ -2967,7 +2967,7 @@ ALTER TABLE ONLY public.log_blocked_domains -- --- Name: log_certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_certificates @@ -2975,7 +2975,7 @@ ALTER TABLE ONLY public.log_certificates -- --- Name: log_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_contacts @@ -2983,7 +2983,7 @@ ALTER TABLE ONLY public.log_contacts -- --- Name: log_dnskeys_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_dnskeys_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_dnskeys @@ -2991,7 +2991,7 @@ ALTER TABLE ONLY public.log_dnskeys -- --- Name: log_domain_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_domain_contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_domain_contacts @@ -2999,7 +2999,7 @@ ALTER TABLE ONLY public.log_domain_contacts -- --- Name: log_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_domains @@ -3007,7 +3007,7 @@ ALTER TABLE ONLY public.log_domains -- --- Name: log_invoice_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_invoice_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_invoice_items @@ -3015,7 +3015,7 @@ ALTER TABLE ONLY public.log_invoice_items -- --- Name: log_invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_invoices @@ -3023,7 +3023,7 @@ ALTER TABLE ONLY public.log_invoices -- --- Name: log_keyrelays_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_keyrelays_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_keyrelays @@ -3031,7 +3031,7 @@ ALTER TABLE ONLY public.log_keyrelays -- --- Name: log_nameservers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_nameservers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_nameservers @@ -3039,7 +3039,7 @@ ALTER TABLE ONLY public.log_nameservers -- --- Name: log_notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_notifications @@ -3047,7 +3047,7 @@ ALTER TABLE ONLY public.log_notifications -- --- Name: log_registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_registrars @@ -3055,7 +3055,7 @@ ALTER TABLE ONLY public.log_registrars -- --- Name: log_reserved_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_reserved_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_reserved_domains @@ -3063,7 +3063,7 @@ ALTER TABLE ONLY public.log_reserved_domains -- --- Name: log_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_settings @@ -3071,7 +3071,7 @@ ALTER TABLE ONLY public.log_settings -- --- Name: log_users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_users @@ -3079,7 +3079,7 @@ ALTER TABLE ONLY public.log_users -- --- Name: log_white_ips_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: log_white_ips_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.log_white_ips @@ -3087,7 +3087,7 @@ ALTER TABLE ONLY public.log_white_ips -- --- Name: nameservers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: nameservers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.nameservers @@ -3095,7 +3095,7 @@ ALTER TABLE ONLY public.nameservers -- --- Name: notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.notifications @@ -3103,7 +3103,7 @@ ALTER TABLE ONLY public.notifications -- --- Name: prices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: prices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.prices @@ -3111,7 +3111,7 @@ ALTER TABLE ONLY public.prices -- --- Name: que_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: que_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.que_jobs @@ -3119,7 +3119,7 @@ ALTER TABLE ONLY public.que_jobs -- --- Name: registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.registrant_verifications @@ -3127,7 +3127,7 @@ ALTER TABLE ONLY public.registrant_verifications -- --- Name: registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.registrars @@ -3135,7 +3135,7 @@ ALTER TABLE ONLY public.registrars -- --- Name: reserved_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: reserved_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.reserved_domains @@ -3143,7 +3143,7 @@ ALTER TABLE ONLY public.reserved_domains -- --- Name: settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.settings @@ -3151,7 +3151,7 @@ ALTER TABLE ONLY public.settings -- --- Name: uniq_contact_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: uniq_contact_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.contacts @@ -3159,7 +3159,7 @@ ALTER TABLE ONLY public.contacts -- --- Name: uniq_domain_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: uniq_domain_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.domains @@ -3167,7 +3167,7 @@ ALTER TABLE ONLY public.domains -- --- Name: uniq_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: uniq_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.auctions @@ -3175,7 +3175,7 @@ ALTER TABLE ONLY public.auctions -- --- Name: unique_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: unique_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.registrars @@ -3183,7 +3183,7 @@ ALTER TABLE ONLY public.registrars -- --- Name: unique_contact_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: unique_contact_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.contacts @@ -3191,7 +3191,7 @@ ALTER TABLE ONLY public.contacts -- --- Name: unique_name; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: unique_name; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.registrars @@ -3199,7 +3199,7 @@ ALTER TABLE ONLY public.registrars -- --- Name: unique_number; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: unique_number; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.invoices @@ -3207,7 +3207,7 @@ ALTER TABLE ONLY public.invoices -- --- Name: unique_reference_no; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: unique_reference_no; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.registrars @@ -3215,7 +3215,7 @@ ALTER TABLE ONLY public.registrars -- --- Name: unique_registration_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: unique_registration_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.auctions @@ -3223,7 +3223,7 @@ ALTER TABLE ONLY public.auctions -- --- Name: unique_session_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: unique_session_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.epp_sessions @@ -3231,7 +3231,7 @@ ALTER TABLE ONLY public.epp_sessions -- --- Name: unique_zone_origin; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: unique_zone_origin; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.zones @@ -3239,7 +3239,7 @@ ALTER TABLE ONLY public.zones -- --- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.users @@ -3247,7 +3247,7 @@ ALTER TABLE ONLY public.users -- --- Name: versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.versions @@ -3255,7 +3255,7 @@ ALTER TABLE ONLY public.versions -- --- Name: white_ips_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: white_ips_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.white_ips @@ -3263,7 +3263,7 @@ ALTER TABLE ONLY public.white_ips -- --- Name: whois_records_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: whois_records_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.whois_records @@ -3271,7 +3271,7 @@ ALTER TABLE ONLY public.whois_records -- --- Name: zones_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: zones_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY public.zones @@ -3279,595 +3279,595 @@ ALTER TABLE ONLY public.zones -- --- Name: index_account_activities_on_account_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_account_activities_on_account_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- CREATE INDEX index_accounts_on_registrar_id ON public.accounts USING btree (registrar_id); -- --- Name: index_blocked_domains_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_blocked_domains_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_blocked_domains_on_name ON public.blocked_domains USING btree (name); -- --- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- CREATE INDEX index_invoices_on_buyer_id ON public.invoices USING btree (buyer_id); -- --- Name: index_keyrelays_on_accepter_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_keyrelays_on_accepter_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_keyrelays_on_accepter_id ON public.keyrelays USING btree (accepter_id); -- --- Name: index_keyrelays_on_domain_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_keyrelays_on_domain_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_keyrelays_on_domain_id ON public.keyrelays USING btree (domain_id); -- --- Name: index_keyrelays_on_requester_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_keyrelays_on_requester_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_keyrelays_on_requester_id ON public.keyrelays USING btree (requester_id); -- --- Name: index_legal_documents_on_checksum; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_legal_documents_on_checksum; Type: INDEX; Schema: public; Owner: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- CREATE INDEX index_log_invoices_on_whodunnit ON public.log_invoices USING btree (whodunnit); -- --- Name: index_log_keyrelays_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_keyrelays_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_log_keyrelays_on_item_type_and_item_id ON public.log_keyrelays USING btree (item_type, item_id); -- --- Name: index_log_keyrelays_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_log_keyrelays_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_log_keyrelays_on_whodunnit ON public.log_keyrelays 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- CREATE INDEX index_log_notifications_on_whodunnit ON public.log_notifications 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- CREATE INDEX index_notifications_on_registrar_id ON public.notifications USING btree (registrar_id); -- --- Name: index_prices_on_zone_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_prices_on_zone_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- 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: -; Tablespace: -- CREATE UNIQUE INDEX unique_schema_migrations ON public.schema_migrations USING btree (version); From 3bdde2881af4cc57aabd73b8f108e7f8a10031e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20V=C3=B5hmar?= Date: Tue, 27 Aug 2019 13:14:07 +0300 Subject: [PATCH 15/15] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b24940ce1..d7554c0b8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,12 @@ +27.8.2019 +* Added some new database constraints [#1265](https://github.com/internetee/registry/pull/1265) + 26.08.2019 * Introduced automatic payment processing using LHV Connect [#1232](https://github.com/internetee/registry/issues/1232) * removed unused script [#1261](https://github.com/internetee/registry/pull/1261) * removed unused factory [#1262](https://github.com/internetee/registry/pull/1262) -* removed unused seller_it columnt from invoices db table [#1264](https://github.com/internetee/registry/pull/1264) -* removed unused rakte tasks [#1268](https://github.com/internetee/registry/pull/1268) +* removed unused seller_it column from invoices db table [#1264](https://github.com/internetee/registry/pull/1264) +* removed unused rake tasks [#1268](https://github.com/internetee/registry/pull/1268) 21.08.2019 * Nokogiri update to 1.10.4 (CVE-2019-5477) [#1266](https://github.com/internetee/registry/pull/1266)