diff --git a/.ruby-version b/.ruby-version
index e30309f73..57cf282eb 100644
--- a/.ruby-version
+++ b/.ruby-version
@@ -1 +1 @@
-2.4.7
+2.6.5
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c0670abc8..94ecb8864 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,31 @@
+26.02.2020
+* Registrar: added an option to remove clientHold status [#1481](https://github.com/internetee/registry/issues/1481)
+* Admin: fixed domain status removal issue [#1543](https://github.com/internetee/registry/issues/1543)
+* Implemented consistent and automated data migrations [#1298](https://github.com/internetee/registry/issues/1298)
+
+20.02.2020
+* E-invoice sending to Que to manage resending in case of an error [#1509](https://github.com/internetee/registry/issues/1509)
+* Check to make sure all monthly invoices fit in available invoice number range [#277](https://github.com/internetee/registry/issues/277)
+* Disabled aurbreak performance monitoring [#1534](https://github.com/internetee/registry/pull/1534)
+
+14.02.2020
+* Fixed Papertrail warnings [#1530](https://github.com/internetee/registry/issues/1530)
+
+12.02.2020
+* Fixed papertrails double recording issue [#1526](https://github.com/internetee/registry/issues/1526)
+* Requests to Directo are now saved for both credit and monthly invoices [#344](https://github.com/internetee/registry/issues/344)
+
+10.02.2020
+* Resolved Money gem deprecation warning and silenced all warnings due plan to replace papertrail [#1522](https://github.com/internetee/registry/pull/1522)
+
+06.02.2020
+* Permit & turn ActiveController::Parameters to hash on domain create [#1516](https://github.com/internetee/registry/issues/1516)
+
+05.02.2020
+* Ruby version upgrade to 2.6.3 [#846](https://github.com/internetee/registry/issues/846)
+* Added retries & raise to connect api to handle timeouts [#1474](https://github.com/internetee/registry/issues/1474)
+* Added logging of XML if there is NoMethodError#text on xml data fields [#1475](https://github.com/internetee/registry/issues/1475)
+
04.02.2020
* Fixed bug that allowed bypassing blocked domain validation using punycode [#1142](https://github.com/internetee/registry/issues/1142)
* SimpleIDN gem update to 0.0.9 [#1508](https://github.com/internetee/registry/pull/1508)
diff --git a/Dockerfile b/Dockerfile
index 7e3b11d80..5d241eeef 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM internetee/ruby:2.4
+FROM internetee/ruby:2.6-buster
RUN mkdir -p /opt/webapps/app/tmp/pids
WORKDIR /opt/webapps/app
diff --git a/Gemfile b/Gemfile
index b3882e792..7b9ee143d 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,8 +1,8 @@
source 'https://rubygems.org'
# core
-gem 'iso8601', '0.8.6' # for dates and times
-gem 'rails', '~> 5.0.7'
+gem 'iso8601', '0.12.1' # for dates and times
+gem 'rails', '~> 5.1.7'
gem 'rest-client'
gem 'uglifier'
@@ -10,11 +10,11 @@ gem 'uglifier'
gem 'figaro', '1.1.1'
# model related
-gem 'pg', '0.19.0'
+gem 'paper_trail', '~> 8.1'
+gem 'pg', '1.2.2'
# 1.8 is for Rails < 5.0
gem 'ransack', '~> 1.8'
gem 'validates_email_format_of', '1.6.3' # validates email against RFC 2822 and RFC 3696
-gem 'paper_trail', '~> 4.0'
# 0.7.3 is the latest for Rails 4.2, however, it is absent on Rubygems server
# https://github.com/huacnlee/rails-settings-cached/issues/165
@@ -36,10 +36,10 @@ gem 'devise', '~> 4.7'
gem 'grape'
# registry specfic
+gem 'data_migrate', '~> 6.1'
gem 'isikukood' # for EE-id validation
gem 'simpleidn', '0.0.9' # For punycode
gem 'money-rails'
-gem 'data_migrate'
gem 'whenever', '0.9.4', require: false
# country listing
@@ -63,7 +63,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'
+gem 'lhv', github: 'internetee/lhv', branch: :master
gem 'domain_name'
gem 'haml', '~> 5.0'
gem 'wkhtmltopdf-binary'
@@ -84,8 +84,8 @@ end
group :test do
gem 'capybara'
gem 'database_cleaner'
+ gem 'minitest', '~> 5.14'
gem 'simplecov', require: false
gem 'webdrivers'
gem 'webmock'
- gem 'minitest', '~> 5.10.0'
end
diff --git a/Gemfile.lock b/Gemfile.lock
index 23aa90a51..5053b9468 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -27,7 +27,7 @@ GIT
GIT
remote: https://github.com/internetee/epp.git
- revision: 76f9fd487d0ca3865b6f706c5a72703951c03996
+ revision: af7cefda37ac81d14b1d12641cde410776082d59
branch: master
specs:
epp (1.5.0)
@@ -36,11 +36,12 @@ GIT
GIT
remote: https://github.com/internetee/lhv.git
- revision: e211516bc5fff2139584d4da41c17511863c229d
- tag: v0.1.0
+ revision: 145f66e21d65a4a7543f6b28a4124440d36fec98
+ branch: master
specs:
lhv (0.1.0)
keystores
+ logger
nokogiri
GIT
@@ -58,70 +59,66 @@ GIT
GEM
remote: https://rubygems.org/
specs:
- actioncable (5.0.7.2)
- actionpack (= 5.0.7.2)
- nio4r (>= 1.2, < 3.0)
+ actioncable (5.1.7)
+ actionpack (= 5.1.7)
+ nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
- actionmailer (5.0.7.2)
- actionpack (= 5.0.7.2)
- actionview (= 5.0.7.2)
- activejob (= 5.0.7.2)
+ actionmailer (5.1.7)
+ actionpack (= 5.1.7)
+ actionview (= 5.1.7)
+ activejob (= 5.1.7)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
- actionpack (5.0.7.2)
- actionview (= 5.0.7.2)
- activesupport (= 5.0.7.2)
+ actionpack (5.1.7)
+ actionview (= 5.1.7)
+ activesupport (= 5.1.7)
rack (~> 2.0)
- rack-test (~> 0.6.3)
+ rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
- actionview (5.0.7.2)
- activesupport (= 5.0.7.2)
+ actionview (5.1.7)
+ activesupport (= 5.1.7)
builder (~> 3.1)
- erubis (~> 2.7.0)
+ erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
- activejob (5.0.7.2)
- activesupport (= 5.0.7.2)
+ activejob (5.1.7)
+ activesupport (= 5.1.7)
globalid (>= 0.3.6)
- activemodel (5.0.7.2)
- activesupport (= 5.0.7.2)
- activerecord (5.0.7.2)
- activemodel (= 5.0.7.2)
- activesupport (= 5.0.7.2)
- arel (~> 7.0)
- activesupport (5.0.7.2)
+ activemodel (5.1.7)
+ activesupport (= 5.1.7)
+ activerecord (5.1.7)
+ activemodel (= 5.1.7)
+ activesupport (= 5.1.7)
+ arel (~> 8.0)
+ activesupport (5.1.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
- airbrake (9.4.5)
- airbrake-ruby (~> 4.7)
- airbrake-ruby (4.7.1)
+ airbrake (10.0.1)
+ airbrake-ruby (~> 4.13)
+ airbrake-ruby (4.13.0)
rbtree3 (~> 0.5)
akami (1.3.1)
gyoku (>= 0.4.0)
nokogiri
- arel (7.1.4)
+ arel (8.0.0)
autodoc (0.7.3)
actionpack
activesupport (>= 3.0.0)
rspec
- autoprefixer-rails (9.6.5)
+ autoprefixer-rails (9.7.4)
execjs
- axiom-types (0.1.1)
- descendants_tracker (~> 0.0.4)
- ice_nine (~> 0.11.0)
- thread_safe (~> 0.3, >= 0.3.1)
bcrypt (3.1.13)
bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0)
- builder (3.2.3)
- cancancan (3.0.1)
- capybara (3.29.0)
+ builder (3.2.4)
+ cancancan (3.0.2)
+ capybara (3.31.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
@@ -132,8 +129,6 @@ GEM
childprocess (3.0.0)
chronic (0.10.2)
coderay (1.1.0)
- coercible (1.0.0)
- descendants_tracker (~> 0.0.1)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
@@ -148,16 +143,14 @@ GEM
unicode_utils (~> 1.4)
crack (0.4.3)
safe_yaml (~> 1.0.0)
- crass (1.0.5)
+ crass (1.0.6)
daemons (1.3.1)
daemons-rails (1.2.1)
daemons
multi_json (~> 1.0)
- data_migrate (6.0.5)
+ data_migrate (6.2.0)
rails (>= 5.0)
- database_cleaner (1.7.0)
- descendants_tracker (0.0.4)
- thread_safe (~> 0.3, >= 0.3.1)
+ database_cleaner (1.8.2)
devise (4.7.1)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
@@ -168,21 +161,42 @@ GEM
docile (1.3.2)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
- equalizer (0.0.11)
+ dry-configurable (0.9.0)
+ concurrent-ruby (~> 1.0)
+ dry-core (~> 0.4, >= 0.4.7)
+ dry-container (0.7.2)
+ concurrent-ruby (~> 1.0)
+ dry-configurable (~> 0.1, >= 0.1.3)
+ dry-core (0.4.9)
+ concurrent-ruby (~> 1.0)
+ dry-equalizer (0.3.0)
+ dry-inflector (0.2.0)
+ dry-logic (1.0.5)
+ concurrent-ruby (~> 1.0)
+ dry-core (~> 0.2)
+ dry-equalizer (~> 0.2)
+ dry-types (1.2.2)
+ concurrent-ruby (~> 1.0)
+ dry-container (~> 0.3)
+ dry-core (~> 0.4, >= 0.4.4)
+ dry-equalizer (~> 0.3)
+ dry-inflector (~> 0.1, >= 0.1.2)
+ dry-logic (~> 1.0, >= 1.0.2)
+ erubi (1.9.0)
erubis (2.7.0)
execjs (2.7.0)
- ffi (1.11.1)
+ ffi (1.12.2)
figaro (1.1.1)
thor (~> 0.14)
globalid (0.4.2)
activesupport (>= 4.2.0)
- grape (1.2.4)
+ grape (1.3.0)
activesupport
builder
+ dry-types (>= 1.1)
mustermann-grape (~> 1.0.0)
rack (>= 1.3.0)
rack-accept
- virtus (>= 1.0.0)
gyoku (1.3.1)
builder (>= 2.1.2)
haml (5.1.2)
@@ -197,12 +211,11 @@ GEM
httpi (2.4.4)
rack
socksify
- i18n (1.7.0)
+ i18n (1.8.2)
concurrent-ruby (~> 1.0)
i18n_data (0.8.0)
- ice_nine (0.11.2)
isikukood (0.1.2)
- iso8601 (0.8.6)
+ iso8601 (0.12.1)
jquery-rails (4.3.5)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
@@ -210,27 +223,28 @@ GEM
jquery-ui-rails (5.0.5)
railties (>= 3.2.16)
json (1.8.6)
- kaminari (1.1.1)
+ kaminari (1.2.0)
activesupport (>= 4.1.0)
- kaminari-actionview (= 1.1.1)
- kaminari-activerecord (= 1.1.1)
- kaminari-core (= 1.1.1)
- kaminari-actionview (1.1.1)
+ kaminari-actionview (= 1.2.0)
+ kaminari-activerecord (= 1.2.0)
+ kaminari-core (= 1.2.0)
+ kaminari-actionview (1.2.0)
actionview
- kaminari-core (= 1.1.1)
- kaminari-activerecord (1.1.1)
+ kaminari-core (= 1.2.0)
+ kaminari-activerecord (1.2.0)
activerecord
- kaminari-core (= 1.1.1)
- kaminari-core (1.1.1)
+ kaminari-core (= 1.2.0)
+ kaminari-core (1.2.0)
keystores (0.4.0)
libxml-ruby (3.1.0)
- loofah (2.3.1)
+ logger (1.4.2)
+ loofah (2.4.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
method_source (0.8.2)
- mime-types (3.3)
+ mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.1009)
mina (0.3.1)
@@ -238,38 +252,38 @@ GEM
rake
mini_mime (1.0.2)
mini_portile2 (2.4.0)
- minitest (5.10.3)
- monetize (1.9.2)
+ minitest (5.14.0)
+ monetize (1.9.4)
money (~> 6.12)
- money (6.13.4)
+ money (6.13.7)
i18n (>= 0.6.4, <= 2)
- money-rails (1.13.2)
+ money-rails (1.13.3)
activesupport (>= 3.0)
monetize (~> 1.9.0)
money (~> 6.13.2)
railties (>= 3.0)
multi_json (1.14.1)
- mustermann (1.0.3)
- mustermann-grape (1.0.0)
- mustermann (~> 1.0.0)
+ mustermann (1.1.1)
+ ruby2_keywords (~> 0.0.1)
+ mustermann-grape (1.0.1)
+ mustermann (>= 1.0.0)
netrc (0.11.0)
nio4r (2.5.2)
- nokogiri (1.10.4)
+ nokogiri (1.10.8)
mini_portile2 (~> 2.4.0)
nori (2.6.0)
open4 (1.3.4)
orm_adapter (0.5.0)
- paper_trail (4.2.0)
- activerecord (>= 3.0, < 6.0)
- activesupport (>= 3.0, < 6.0)
+ paper_trail (8.1.2)
+ activerecord (>= 4.2, < 5.2)
request_store (~> 1.1)
pdfkit (0.8.4.1)
- pg (0.19.0)
+ pg (1.2.2)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
- public_suffix (4.0.1)
+ public_suffix (4.0.3)
puma (4.3.1)
nio4r (~> 2.0)
que (0.14.3)
@@ -277,25 +291,25 @@ GEM
erubis
que (~> 0.8)
sinatra
- rack (2.0.8)
+ rack (2.1.2)
rack-accept (0.4.5)
rack (>= 0.4)
- rack-protection (2.0.7)
+ rack-protection (2.0.8.1)
rack
- rack-test (0.6.3)
- rack (>= 1.0)
+ rack-test (1.1.0)
+ rack (>= 1.0, < 3)
railroady (1.3.0)
- rails (5.0.7.2)
- actioncable (= 5.0.7.2)
- actionmailer (= 5.0.7.2)
- actionpack (= 5.0.7.2)
- actionview (= 5.0.7.2)
- activejob (= 5.0.7.2)
- activemodel (= 5.0.7.2)
- activerecord (= 5.0.7.2)
- activesupport (= 5.0.7.2)
+ rails (5.1.7)
+ actioncable (= 5.1.7)
+ actionmailer (= 5.1.7)
+ actionpack (= 5.1.7)
+ actionview (= 5.1.7)
+ activejob (= 5.1.7)
+ activemodel (= 5.1.7)
+ activerecord (= 5.1.7)
+ activesupport (= 5.1.7)
bundler (>= 1.3.0)
- railties (= 5.0.7.2)
+ railties (= 5.1.7)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
@@ -304,25 +318,25 @@ GEM
loofah (~> 2.3)
rails-settings-cached (0.7.2)
rails (>= 4.2.0)
- railties (5.0.7.2)
- actionpack (= 5.0.7.2)
- activesupport (= 5.0.7.2)
+ railties (5.1.7)
+ actionpack (= 5.1.7)
+ activesupport (= 5.1.7)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
- rake (13.0.0)
+ rake (13.0.1)
ransack (1.8.10)
actionpack (>= 3.0, < 5.2)
activerecord (>= 3.0, < 5.2)
activesupport (>= 3.0, < 5.2)
i18n
rb-fsevent (0.10.3)
- rb-inotify (0.10.0)
+ rb-inotify (0.10.1)
ffi (~> 1.0)
- rbtree3 (0.5.0)
+ rbtree3 (0.6.0)
rdoc (4.3.0)
regexp_parser (1.6.0)
- request_store (1.4.1)
+ request_store (1.5.0)
rack (>= 1.4)
responders (3.0.0)
actionpack (>= 5.0)
@@ -336,16 +350,17 @@ GEM
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
- rspec-core (3.9.0)
- rspec-support (~> 3.9.0)
+ rspec-core (3.9.1)
+ rspec-support (~> 3.9.1)
rspec-expectations (3.9.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
- rspec-mocks (3.9.0)
+ rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
- rspec-support (3.9.0)
- rubyzip (2.0.0)
+ rspec-support (3.9.2)
+ ruby2_keywords (0.0.2)
+ rubyzip (2.2.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
@@ -374,19 +389,18 @@ GEM
select2-rails (3.5.9.3)
thor (~> 0.14)
selectize-rails (0.12.1)
- selenium-webdriver (3.142.6)
+ selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
- simplecov (0.17.1)
+ simplecov (0.18.1)
docile (~> 1.1)
- json (>= 1.8, < 3)
- simplecov-html (~> 0.10.0)
- simplecov-html (0.10.2)
+ simplecov-html (~> 0.11.0)
+ simplecov-html (0.11.0)
simpleidn (0.0.9)
- sinatra (2.0.7)
+ sinatra (2.0.8.1)
mustermann (~> 1.0)
rack (~> 2.0)
- rack-protection (= 2.0.7)
+ rack-protection (= 2.0.8.1)
tilt (~> 2.0)
sixarm_ruby_unaccent (1.2.0)
slop (3.6.0)
@@ -402,7 +416,7 @@ GEM
thor (0.20.3)
thread_safe (0.3.6)
tilt (2.0.10)
- tzinfo (1.2.5)
+ tzinfo (1.2.6)
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
@@ -412,21 +426,16 @@ GEM
unicode_utils (1.4.0)
validates_email_format_of (1.6.3)
i18n
- virtus (1.0.5)
- axiom-types (~> 0.1)
- coercible (~> 1.0)
- descendants_tracker (~> 0.0, >= 0.0.3)
- equalizer (~> 0.0, >= 0.0.9)
warden (1.2.8)
rack (>= 2.0.6)
wasabi (3.5.0)
httpi (~> 2.0)
nokogiri (>= 1.4.2)
- webdrivers (4.1.3)
+ webdrivers (4.2.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
- webmock (3.7.6)
+ webmock (3.8.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
@@ -435,7 +444,7 @@ GEM
websocket-extensions (0.1.4)
whenever (0.9.4)
chronic (>= 0.6.3)
- wkhtmltopdf-binary (0.12.4)
+ wkhtmltopdf-binary (0.12.5.1)
xpath (3.2.0)
nokogiri (~> 1.8)
@@ -453,7 +462,7 @@ DEPENDENCIES
company_register!
countries
daemons-rails (= 1.2.1)
- data_migrate
+ data_migrate (~> 6.1)
database_cleaner
devise (~> 4.7)
digidoc_client!
@@ -465,24 +474,24 @@ DEPENDENCIES
grape
haml (~> 5.0)
isikukood
- iso8601 (= 0.8.6)
+ iso8601 (= 0.12.1)
jquery-rails
jquery-ui-rails (= 5.0.5)
kaminari
lhv!
mina (= 0.3.1)
- minitest (~> 5.10.0)
+ minitest (~> 5.14)
money-rails
nokogiri
- paper_trail (~> 4.0)
+ paper_trail (~> 8.1)
pdfkit
- pg (= 0.19.0)
+ pg (= 1.2.2)
pry (= 0.10.1)
puma
que
que-web
railroady (= 1.3.0)
- rails (~> 5.0.7)
+ rails (~> 5.1.7)
rails-settings-cached (= 0.7.2)
ransack (~> 1.8)
rest-client
@@ -500,4 +509,4 @@ DEPENDENCIES
wkhtmltopdf-binary
BUNDLED WITH
- 2.0.2
+ 2.1.4
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 1a57b5573..5a6b45668 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -1,5 +1,6 @@
class ApplicationController < ActionController::Base
check_authorization unless: :devise_controller?
+ before_action :set_paper_trail_whodunnit
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
@@ -32,4 +33,4 @@ class ApplicationController < ActionController::Base
def available_languages
{ en: 'English', et: 'Estonian' }.invert
end
-end
\ No newline at end of file
+end
diff --git a/app/controllers/epp/base_controller.rb b/app/controllers/epp/base_controller.rb
index 6e3f39e46..fb48c285a 100644
--- a/app/controllers/epp/base_controller.rb
+++ b/app/controllers/epp/base_controller.rb
@@ -10,7 +10,7 @@ module Epp
before_action :latin_only
before_action :validate_against_schema
before_action :validate_request
- before_action :update_epp_session, if: 'signed_in?'
+ before_action :update_epp_session, if: -> { signed_in? }
around_action :wrap_exceptions
diff --git a/app/controllers/epp/domains_controller.rb b/app/controllers/epp/domains_controller.rb
index 1295f558e..9e4f6123a 100644
--- a/app/controllers/epp/domains_controller.rb
+++ b/app/controllers/epp/domains_controller.rb
@@ -2,6 +2,7 @@ module Epp
class DomainsController < BaseController
before_action :find_domain, only: %i[info renew update transfer delete]
before_action :find_password, only: %i[info update transfer delete]
+ before_action :set_paper_trail_whodunnit
def info
authorize! :info, @domain
diff --git a/app/controllers/epp/sessions_controller.rb b/app/controllers/epp/sessions_controller.rb
index 2175f7281..ef8f125ee 100644
--- a/app/controllers/epp/sessions_controller.rb
+++ b/app/controllers/epp/sessions_controller.rb
@@ -1,6 +1,7 @@
module Epp
class SessionsController < BaseController
skip_authorization_check only: [:hello, :login, :logout]
+ before_action :set_paper_trail_whodunnit
def hello
render_epp_response('greeting')
diff --git a/app/controllers/registrar/domains_controller.rb b/app/controllers/registrar/domains_controller.rb
index f533a874c..3e721666b 100644
--- a/app/controllers/registrar/domains_controller.rb
+++ b/app/controllers/registrar/domains_controller.rb
@@ -59,6 +59,7 @@ class Registrar
def info
authorize! :info, Depp::Domain
@data = @domain.info(params[:domain_name]) if params[:domain_name]
+ @client_holded = client_holded(@data)
if response_ok?
render 'info'
else
@@ -85,7 +86,7 @@ class Registrar
def create
authorize! :create, Depp::Domain
- @domain_params = params[:domain]
+ @domain_params = domain_params.to_h
@data = @domain.create(@domain_params)
if response_ok?
@@ -153,12 +154,26 @@ class Registrar
render json: scope.pluck(:name, :code).map { |c| { display_key: "#{c.second} #{c.first}", value: c.second } }
end
+ def remove_hold
+ authorize! :remove_hold, Depp::Domain
+ return unless params[:domain_name]
+
+ @data = @domain.remove_hold(params)
+
+ flash[:alert] = @data.css('msg').text unless response_ok?
+ redirect_to info_registrar_domains_url(domain_name: params[:domain_name])
+ end
+
private
def init_domain
@domain = Depp::Domain.new(current_user: depp_current_user)
end
+ def client_holded(data)
+ data.css('status')&.map { |element| element.attribute('s').value }
+ &.any? { |status| status == DomainStatus::CLIENT_HOLD }
+ end
def contacts
current_registrar_user.registrar.contacts
@@ -187,5 +202,12 @@ class Registrar
:valid_to_lteq,
:s)
end
+
+ def domain_params
+ params.require(:domain).permit(:name, :period, :registrant, :registrant_helper, :reserved_pw,
+ :legal_document, contacts_attributes: {},
+ nameservers_attributes: {},
+ dnskeys_attributes: {})
+ end
end
end
diff --git a/app/jobs/send_e_invoice_job.rb b/app/jobs/send_e_invoice_job.rb
new file mode 100644
index 000000000..e281db14d
--- /dev/null
+++ b/app/jobs/send_e_invoice_job.rb
@@ -0,0 +1,43 @@
+class SendEInvoiceJob < Que::Job
+ def run(invoice_id)
+ invoice = run_condition(Invoice.find_by(id: invoice_id))
+
+ invoice.to_e_invoice.deliver
+ ActiveRecord::Base.transaction do
+ invoice.update(e_invoice_sent_at: Time.zone.now)
+ log_success(invoice)
+ destroy
+ end
+ rescue StandardError => e
+ log_error(invoice: invoice, error: e)
+ raise e
+ end
+
+ private
+
+ def run_condition(invoice)
+ destroy unless invoice
+ destroy if invoice.do_not_send_e_invoice?
+ invoice
+ end
+
+ def log_success(invoice)
+ id = invoice.try(:id) || invoice
+ message = "E-Invoice for an invoice with ID # #{id} was sent successfully"
+ logger.info message
+ end
+
+ def log_error(invoice:, error:)
+ id = invoice.try(:id) || invoice
+ message = <<~TEXT.squish
+ There was an error sending e-invoice for invoice with ID # #{id}.
+ The error message was the following: #{error}
+ This job will retry.
+ TEXT
+ logger.error message
+ end
+
+ def logger
+ Rails.logger
+ end
+end
diff --git a/app/models/ability.rb b/app/models/ability.rb
index 9a0676ac8..a727254ad 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -50,6 +50,7 @@ class Ability
can(:check, Epp::Domain)
can(:create, Epp::Domain)
can(:renew, Epp::Domain) { |d| d.registrar_id == @user.registrar_id }
+ can(:remove_hold, Epp::Domain) { |d| d.registrar_id == @user.registrar_id }
can(:update, Epp::Domain) { |d, pw| d.registrar_id == @user.registrar_id || d.transfer_code == pw }
can(:transfer, Epp::Domain)
can(:delete, Epp::Domain) { |d, pw| d.registrar_id == @user.registrar_id || d.transfer_code == pw }
diff --git a/app/models/admin_user.rb b/app/models/admin_user.rb
index 07686e921..159578ab0 100644
--- a/app/models/admin_user.rb
+++ b/app/models/admin_user.rb
@@ -4,7 +4,7 @@ class AdminUser < User
validates :identity_code, presence: true, if: -> { country_code == 'EE' }
validates :email, presence: true
validates :password, :password_confirmation, presence: true, if: :new_record?
- validates :password_confirmation, presence: true, if: :encrypted_password_changed?
+ validates :password_confirmation, presence: true, if: :will_save_change_to_encrypted_password?
validate :validate_identity_code, if: -> { country_code == 'EE' }
ROLES = %w(user customer_service admin) # should not match to api_users roles
diff --git a/app/models/api_user.rb b/app/models/api_user.rb
index e11dbf90f..3dc240727 100644
--- a/app/models/api_user.rb
+++ b/app/models/api_user.rb
@@ -43,7 +43,7 @@ class ApiUser < User
after_initialize :set_defaults
def set_defaults
return unless new_record?
- self.active = true unless active_changed?
+ self.active = true unless saved_change_to_active?
end
class << self
diff --git a/app/models/concerns/contact/transferable.rb b/app/models/concerns/contact/transferable.rb
index 3f151251a..987933a8d 100644
--- a/app/models/concerns/contact/transferable.rb
+++ b/app/models/concerns/contact/transferable.rb
@@ -3,7 +3,7 @@ module Concerns::Contact::Transferable
included do
validates :auth_info, presence: true
- after_initialize :generate_auth_info, if: 'new_record? && auth_info.blank?'
+ after_initialize :generate_auth_info, if: -> { new_record? && auth_info.blank? }
end
def transfer(new_registrar)
diff --git a/app/models/concerns/remove_hold.rb b/app/models/concerns/remove_hold.rb
new file mode 100644
index 000000000..1da3b5a7f
--- /dev/null
+++ b/app/models/concerns/remove_hold.rb
@@ -0,0 +1,9 @@
+module RemoveHold
+ extend ActiveSupport::Concern
+
+ def remove_hold(params)
+ xml = epp_xml.update(name: { value: params[:domain_name] },
+ rem: [status: { attrs: { s: 'clientHold' }, value: '' }])
+ current_user.request(xml)
+ end
+end
diff --git a/app/models/concerns/versions.rb b/app/models/concerns/versions.rb
index b0a82376f..9ffd17e9a 100644
--- a/app/models/concerns/versions.rb
+++ b/app/models/concerns/versions.rb
@@ -1,10 +1,16 @@
# Papertrail concerns is mainly tested at country spec
module Versions
extend ActiveSupport::Concern
+ WITH_CHILDREN = %w[Domain Contact].freeze
included do
attr_accessor :version_loader
- has_paper_trail class_name: "#{model_name}Version"
+
+ if WITH_CHILDREN.include?(model_name.name)
+ has_paper_trail class_name: "#{model_name}Version", meta: { children: :children_log }
+ else
+ has_paper_trail class_name: "#{model_name}Version"
+ end
# add creator and updator
before_create :add_creator
@@ -45,17 +51,17 @@ module Versions
# callbacks
def touch_domain_version
- domain.try(:touch_with_version)
+ domain.paper_trail.try(:touch_with_version)
end
def touch_domains_version
- domains.each(&:touch_with_version)
+ domains.each { |domain| domain.paper_trail.touch_with_version }
end
end
module ClassMethods
def all_versions_for(ids, time)
- ver_klass = paper_trail_version_class
+ ver_klass = paper_trail.version_class
from_history = ver_klass.where(item_id: ids.to_a).
order(:item_id).
preceding(time + 1, true).
diff --git a/app/models/contact.rb b/app/models/contact.rb
index 558292dbd..f5f41e2f7 100644
--- a/app/models/contact.rb
+++ b/app/models/contact.rb
@@ -14,8 +14,6 @@ class Contact < ApplicationRecord
has_many :registrant_domains, class_name: 'Domain', foreign_key: 'registrant_id'
has_many :actions, dependent: :destroy
- has_paper_trail class_name: "ContactVersion", meta: { children: :children_log }
-
attr_accessor :legal_document_id
alias_attribute :kind, :ident_type
alias_attribute :copy_from_id, :original_id # Old attribute name; for PaperTrail
@@ -23,12 +21,14 @@ class Contact < ApplicationRecord
accepts_nested_attributes_for :legal_documents
validates :name, :email, presence: true
- validates :street, :city, :zip, :country_code, presence: true, if: 'self.class.address_processing?'
+ validates :street, :city, :zip, :country_code, presence: true, if: lambda {
+ self.class.address_processing?
+ }
validates :phone, presence: true, e164: true, phone: true
validates :email, format: /@/
- validates :email, email_format: { message: :invalid }, if: proc { |c| c.email_changed? }
+ validates :email, email_format: { message: :invalid }, if: proc { |c| c.will_save_change_to_email? }
validates :code,
uniqueness: { message: :epp_id_taken },
@@ -37,7 +37,7 @@ class Contact < ApplicationRecord
validates_associated :identifier
validate :validate_html
- validate :validate_country_code, if: 'self.class.address_processing?'
+ validate :validate_country_code, if: -> { self.class.address_processing? }
after_initialize do
self.status_notes = {} if status_notes.nil?
diff --git a/app/models/depp/domain.rb b/app/models/depp/domain.rb
index e2413a004..3bb3b7473 100644
--- a/app/models/depp/domain.rb
+++ b/app/models/depp/domain.rb
@@ -1,6 +1,7 @@
module Depp
class Domain
include ActiveModel::Conversion
+ include RemoveHold
extend ActiveModel::Naming
attr_accessor :name, :current_user, :epp_xml
diff --git a/app/models/directo.rb b/app/models/directo.rb
index 789db64b2..e311641e6 100644
--- a/app/models/directo.rb
+++ b/app/models/directo.rb
@@ -48,16 +48,18 @@ class Directo < ApplicationRecord
Rails.logger.info("[Directo] XML request: #{data}")
response = RestClient::Request.execute(url: ENV['directo_invoice_url'], method: :post, payload: {put: "1", what: "invoice", xmldata: data}, verify_ssl: false)
Rails.logger.info("[Directo] Directo responded with code: #{response.code}, body: #{response.body}")
- dump_result_to_db(mappers, response.to_s)
+ dump_result_to_db(mappers: mappers, xml: response.to_s, data: data)
end
STDOUT << "#{Time.zone.now.utc} - Directo receipts sending finished. #{counter} of #{total} are sent\n"
end
- def self.dump_result_to_db mappers, xml
+ def self.dump_result_to_db(mappers:, xml:, data:)
Nokogiri::XML(xml).css("Result").each do |res|
obj = mappers[res.attributes["docid"].value.to_i]
- obj.directo_records.create!(response: res.as_json.to_h, invoice_number: obj.number)
+ obj.directo_records.create!(request: data,
+ response: res.as_json.to_h,
+ invoice_number: obj.number)
obj.update_columns(in_directo: true)
Rails.logger.info("[DIRECTO] Invoice #{res.attributes["docid"].value} was pushed and return is #{res.as_json.to_h.inspect}")
end
@@ -65,7 +67,7 @@ class Directo < ApplicationRecord
def self.send_monthly_invoices(debug: false)
- I18n.locale = :et
+ I18n.locale = :et unless Rails.env.test?
month = Time.now - 1.month
invoices_until = month.end_of_month
date_format = "%Y-%m-%d"
@@ -74,8 +76,9 @@ class Directo < ApplicationRecord
min_directo = Setting.directo_monthly_number_min.presence.try(:to_i)
max_directo = Setting.directo_monthly_number_max.presence.try(:to_i)
last_directo = [Setting.directo_monthly_number_last.presence.try(:to_i), min_directo].compact.max || 0
- if max_directo && max_directo <= last_directo
- raise "Directo counter is out of period (max allowed number is smaller than last counter number)"
+ if max_directo && (max_directo <= last_directo + Registrar.count)
+ raise 'Directo counter is out of period (max allowed number is smaller than last counter'\
+ 'number plus Registrar\'s count)'
end
directo_next = last_directo
diff --git a/app/models/dnskey.rb b/app/models/dnskey.rb
index 922844874..c0f3f7491 100644
--- a/app/models/dnskey.rb
+++ b/app/models/dnskey.rb
@@ -9,10 +9,16 @@ class Dnskey < ApplicationRecord
validate :validate_protocol
validate :validate_flags
- before_save -> { generate_digest if public_key_changed? && !ds_digest_changed? }
+ before_save lambda {
+ generate_digest if will_save_change_to_public_key? && !will_save_change_to_ds_digest?
+ }
before_save lambda {
- if (public_key_changed? || flags_changed? || alg_changed? || protocol_changed?) && !ds_key_tag_changed?
+ if (will_save_change_to_public_key? ||
+ will_save_change_to_flags? ||
+ will_save_change_to_alg? ||
+ will_save_change_to_protocol?) &&
+ !will_save_change_to_ds_key_tag?
generate_ds_key_tag
end
}
diff --git a/app/models/domain.rb b/app/models/domain.rb
index d6545284d..f21317b70 100644
--- a/app/models/domain.rb
+++ b/app/models/domain.rb
@@ -10,8 +10,6 @@ class Domain < ApplicationRecord
include Concerns::Domain::RegistryLockable
include Concerns::Domain::Releasable
- has_paper_trail class_name: "DomainVersion", meta: { children: :children_log }
-
attr_accessor :roles
attr_accessor :legal_document_id
@@ -73,12 +71,13 @@ class Domain < ApplicationRecord
before_update :manage_statuses
def manage_statuses
- return unless registrant_id_changed? # rollback has not yet happened
+ return unless will_save_change_to_registrant_id? # rollback has not yet happened
+
pending_update! if registrant_verification_asked?
true
end
- after_commit :update_whois_record, unless: 'domain_name.at_auction?'
+ after_commit :update_whois_record, unless: -> { domain_name.at_auction? }
after_create :update_reserved_domains
def update_reserved_domains
@@ -486,9 +485,9 @@ class Domain < ApplicationRecord
self.delete_date = nil
when DomainStatus::SERVER_MANUAL_INZONE # removal causes server hold to set
self.outzone_at = Time.zone.now if force_delete_scheduled?
- when DomainStatus::DomainStatus::EXPIRED # removal causes server hold to set
+ when DomainStatus::EXPIRED # removal causes server hold to set
self.outzone_at = self.expire_time + 15.day
- when DomainStatus::DomainStatus::SERVER_HOLD # removal causes server hold to set
+ when DomainStatus::SERVER_HOLD # removal causes server hold to set
self.outzone_at = nil
end
end
@@ -547,7 +546,7 @@ class Domain < ApplicationRecord
activate if nameservers.reject(&:marked_for_destruction?).size >= Setting.ns_min_count
end
- cancel_force_delete if force_delete_scheduled? && registrant_id_changed?
+ cancel_force_delete if force_delete_scheduled? && will_save_change_to_registrant_id?
if statuses.empty? && valid?
statuses << DomainStatus::OK
diff --git a/app/models/epp/contact.rb b/app/models/epp/contact.rb
index 742f0339f..fa488d9e1 100644
--- a/app/models/epp/contact.rb
+++ b/app/models/epp/contact.rb
@@ -182,7 +182,7 @@ class Epp::Contact < Contact
self.attributes = at
- email_changed = email_changed?
+ email_changed = will_save_change_to_email?
old_email = email_was
updated = save
diff --git a/app/models/invoice.rb b/app/models/invoice.rb
index 3aa2a5c3c..1c6bced6e 100644
--- a/app/models/invoice.rb
+++ b/app/models/invoice.rb
@@ -103,6 +103,14 @@ class Invoice < ApplicationRecord
generator.generate
end
+ def do_not_send_e_invoice?
+ e_invoice_sent? || cancelled? || paid?
+ end
+
+ def e_invoice_sent?
+ e_invoice_sent_at.present?
+ end
+
private
def apply_default_buyer_vat_no
diff --git a/app/models/payment_orders/bank_link.rb b/app/models/payment_orders/bank_link.rb
index 5bfd02c48..c8714d245 100644
--- a/app/models/payment_orders/bank_link.rb
+++ b/app/models/payment_orders/bank_link.rb
@@ -93,9 +93,7 @@ module PaymentOrders
source = number_with_precision(
BigDecimal(response['VK_AMOUNT']), precision: 2, separator: '.'
)
- target = number_with_precision(
- invoice.total, precision: 2, separator: '.'
- )
+ target = number_with_precision(invoice.total, precision: 2, separator: '.')
source == target
end
diff --git a/app/models/registrar.rb b/app/models/registrar.rb
index 8f41d62ca..f657cdc74 100644
--- a/app/models/registrar.rb
+++ b/app/models/registrar.rb
@@ -21,9 +21,9 @@ class Registrar < ApplicationRecord
validates :reference_no, format: Billing::ReferenceNo::REGEXP
validate :forbid_special_code
- validates :vat_rate, presence: true, if: 'vat_liable_in_foreign_country? && vat_no.blank?'
+ validates :vat_rate, presence: true, if: -> { vat_liable_in_foreign_country? && vat_no.blank? }
validates :vat_rate, absence: true, if: :vat_liable_locally?
- validates :vat_rate, absence: true, if: 'vat_liable_in_foreign_country? && vat_no?'
+ validates :vat_rate, absence: true, if: -> { vat_liable_in_foreign_country? && vat_no? }
validates :vat_rate, numericality: { greater_than_or_equal_to: 0, less_than: 100 },
allow_nil: true
@@ -33,7 +33,7 @@ class Registrar < ApplicationRecord
after_initialize :set_defaults
validates :email, email_format: { message: :invalid },
- allow_blank: true, if: proc { |c| c.email_changed? }
+ allow_blank: true, if: proc { |c| c.will_save_change_to_email? }
validates :billing_email, email_format: { message: :invalid }, allow_blank: true
alias_attribute :contact_email, :email
@@ -99,9 +99,7 @@ class Registrar < ApplicationRecord
}
]
)
-
- e_invoice = invoice.to_e_invoice
- e_invoice.deliver
+ SendEInvoiceJob.enqueue(invoice.id)
invoice
end
diff --git a/app/views/registrar/domains/info.html.erb b/app/views/registrar/domains/info.html.erb
index 1fcfc23c3..e88882233 100644
--- a/app/views/registrar/domains/info.html.erb
+++ b/app/views/registrar/domains/info.html.erb
@@ -6,6 +6,10 @@
class: 'btn btn-default') %>
<%= link_to(t(:delete), delete_registrar_domains_path(domain_name: params[:domain_name]),
class: 'btn btn-default') %>
+ <% if @client_holded %>
+ <%= link_to(t(:remove_client_hold), remove_hold_registrar_domains_path(domain_name: params[:domain_name]),
+ class: 'btn btn-default') %>
+ <% end %>
<% else %>
<%= link_to t('.transfer_btn'), new_registrar_domain_transfer_path(domain_name: params[:domain_name]),
class: 'btn btn-default' %>
diff --git a/app/views/registrar/xml_consoles/epp_requests/domain/client_hold.xml b/app/views/registrar/xml_consoles/epp_requests/domain/client_hold.xml
new file mode 100644
index 000000000..fcafec538
--- /dev/null
+++ b/app/views/registrar/xml_consoles/epp_requests/domain/client_hold.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ example.ee
+
+
+
+
+
+ timo-1579351654
+
+
diff --git a/app/views/registrar/xml_consoles/show.haml b/app/views/registrar/xml_consoles/show.haml
index f96b67738..bb66116ee 100644
--- a/app/views/registrar/xml_consoles/show.haml
+++ b/app/views/registrar/xml_consoles/show.haml
@@ -29,6 +29,9 @@
,
%a.js-load-xml{href: 'javascript:void(0)', data: {obj: 'domain', epp_action: 'delete'}}
Delete
+ ,
+ %a.js-load-xml{href: 'javascript:void(0)', data: {obj: 'domain', epp_action: 'client_hold'}}
+ Remove Client Hold
%h4 Poll
%a.js-load-xml{href: 'javascript:void(0)', data: {obj: 'poll', epp_action: 'poll'}}
diff --git a/bin/setup b/bin/setup
index b3067cf22..b5ca43ac5 100755
--- a/bin/setup
+++ b/bin/setup
@@ -1,33 +1,36 @@
#!/usr/bin/env ruby
require 'pathname'
-require 'fileutils'
+include FileUtils
# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
-
def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
end
-Dir.chdir APP_ROOT do
+chdir APP_ROOT do
+ # This script is a starting point to setup your application.
+ # Add necessary setup steps to this file.
- puts '== Installing dependencies with bundler =='
+ puts '== Installing dependencies =='
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')
- puts "\n== Copying sample development database config files =="
- unless File.exist?('config/database.yml')
- system! 'cp config/database-example-development.yml config/database.yml'
- end
+ # Install JavaScript dependencies if using Yarn
+ # system('bin/yarn')
+
+ puts "\n== Copying sample files =="
+ unless File.exist?('config/database.yml')
+ system! 'cp config/database.yml.sample config/database.yml'
+ end
puts "\n== Preparing database =="
system! 'bin/rails db:setup'
puts "\n== Removing old logs and tempfiles =="
- system! 'bin/rake log:clear tmp:clear'
+ system! 'bin/rails log:clear tmp:clear'
puts "\n== Restarting application server =="
- system! 'touch tmp/restart.txt'
-
+ system! 'bin/rails restart'
end
diff --git a/bin/update b/bin/update
old mode 100644
new mode 100755
diff --git a/bin/yarn b/bin/yarn
new file mode 100755
index 000000000..c2bacef83
--- /dev/null
+++ b/bin/yarn
@@ -0,0 +1,11 @@
+#!/usr/bin/env ruby
+VENDOR_PATH = File.expand_path('..', __dir__)
+Dir.chdir(VENDOR_PATH) do
+ begin
+ exec "yarnpkg #{ARGV.join(" ")}"
+ rescue Errno::ENOENT
+ $stderr.puts "Yarn executable was not detected in the system."
+ $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
+ exit 1
+ end
+end
diff --git a/config/application.rb b/config/application.rb
index c70ab2111..72b592a3b 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -16,6 +16,7 @@ end
module DomainNameRegistry
class Application < Rails::Application
+ config.load_defaults 5.1
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
diff --git a/config/cable.yml b/config/cable.yml
index 0bbde6f74..858bb1f14 100644
--- a/config/cable.yml
+++ b/config/cable.yml
@@ -7,3 +7,4 @@ test:
production:
adapter: redis
url: redis://localhost:6379/1
+ channel_prefix: domain_name_registry_production
diff --git a/config/environments/production.rb b/config/environments/production.rb
index c2262235d..6e13ea1f7 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -66,7 +66,7 @@ Rails.application.configure do
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
- config.i18n.fallbacks = [I18n.default_locale]
+ config.i18n.fallbacks = true
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 6913ceb7e..784b48f42 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -1,4 +1,6 @@
+
Rails.application.configure do
+ $VERBOSE = nil
# Settings specified here will take precedence over those in config/application.rb.
# The test environment is used exclusively to run your application's
@@ -30,7 +32,7 @@ Rails.application.configure do
config.action_mailer.raise_delivery_errors = false
# Print deprecation notices to the stderr.
- config.active_support.deprecation = :stderr
+ config.active_support.deprecation = :silence
# Raises error for missing translations
config.action_view.raise_on_missing_translations = true
diff --git a/config/initializers/airbrake.rb b/config/initializers/airbrake.rb
index 917deb02a..5c1983369 100644
--- a/config/initializers/airbrake.rb
+++ b/config/initializers/airbrake.rb
@@ -3,6 +3,9 @@ Airbrake.configure do |config|
config.project_id = ENV['airbrake_project_id']
config.project_key = ENV['airbrake_project_key']
config.root_directory = Rails.root
+ config.job_stats = false
+ config.query_stats = false
+ config.performance_stats = false
config.logger =
if ENV['RAILS_LOG_TO_STDOUT'].present?
Logger.new(STDOUT, level: Rails.logger.level)
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb
index d3b8408d5..ba78ea325 100644
--- a/config/initializers/assets.rb
+++ b/config/initializers/assets.rb
@@ -5,7 +5,7 @@ Rails.application.configure do
config.assets.version = '1.0'
# Add additional assets to the asset load path
- config.assets.paths << Rails.root.join('vendor', 'assets', 'fonts')
+ config.assets.paths << Rails.root.join('vendor', 'assets', 'fonts', 'node_modules')
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
@@ -14,4 +14,5 @@ Rails.application.configure do
config.assets.precompile += %w(admin-manifest.css admin-manifest.js)
config.assets.precompile += %w(registrar-manifest.css registrar-manifest.js)
config.assets.precompile += %w(registrant-manifest.css registrant-manifest.js)
+ config.assets.precompile += %w( admin.js admin.css )
end
diff --git a/config/initializers/money.rb b/config/initializers/money.rb
index cb476b589..a52ff280d 100644
--- a/config/initializers/money.rb
+++ b/config/initializers/money.rb
@@ -1,4 +1,6 @@
MoneyRails.configure do |config|
# Wrapper for Money#default_currency with additional functionality
config.default_currency = :eur
-end
\ No newline at end of file
+ config.rounding_mode = BigDecimal::ROUND_HALF_EVEN
+ config.locale_backend = :i18n
+end
diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb
index 99b2db3b0..2f9c3c5cb 100644
--- a/config/initializers/new_framework_defaults.rb
+++ b/config/initializers/new_framework_defaults.rb
@@ -6,7 +6,8 @@
#
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
-Rails.application.config.action_controller.raise_on_unfiltered_parameters = true
+# DEPRECATION WARNING: raise_on_unfiltered_parameters is deprecated and has no effect in Rails 5.1.
+#Rails.application.config.action_controller.raise_on_unfiltered_parameters = true
# Enable per-form CSRF tokens. Previous versions had false.
Rails.application.config.action_controller.per_form_csrf_tokens = true
@@ -19,7 +20,9 @@ Rails.application.config.action_controller.forgery_protection_origin_check = tru
ActiveSupport.to_time_preserves_timezone = true
# Do not halt callback chains when a callback returns false. Previous versions had true.
-ActiveSupport.halt_callback_chains_on_return_false = false
+# DEPRECATION WARNING: ActiveSupport.halt_callback_chains_on_return_false= is deprecated and
+# will be removed in Rails 5.2.
+#ActiveSupport.halt_callback_chains_on_return_false = false
# Configure SSL options to enable HSTS with subdomains. Previous versions had false.
Rails.application.config.ssl_options = { hsts: { subdomains: true } }
diff --git a/config/initializers/new_framework_defaults_5_1.rb b/config/initializers/new_framework_defaults_5_1.rb
new file mode 100644
index 000000000..9010abd5c
--- /dev/null
+++ b/config/initializers/new_framework_defaults_5_1.rb
@@ -0,0 +1,14 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file contains migration options to ease your Rails 5.1 upgrade.
+#
+# Once upgraded flip defaults one by one to migrate to the new default.
+#
+# Read the Guide for Upgrading Ruby on Rails for more info on each option.
+
+# Make `form_with` generate non-remote forms.
+Rails.application.config.action_view.form_with_generates_remote_forms = false
+
+# Unknown asset fallback will return the path passed in when the given
+# asset is not present in the asset pipeline.
+# Rails.application.config.assets.unknown_asset_fallback = false
diff --git a/config/initializers/paper_trail.rb b/config/initializers/paper_trail.rb
new file mode 100644
index 000000000..39a667917
--- /dev/null
+++ b/config/initializers/paper_trail.rb
@@ -0,0 +1 @@
+PaperTrail.config.track_associations = false
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 74040fe98..cf72b1027 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -206,6 +206,7 @@ en:
statuses: 'Statuses'
description: 'Description'
delete: 'Delete'
+ remove_client_hold: 'Remove clientHold'
are_you_sure: 'Are you sure?'
back: 'Back'
new_domain: 'New domain'
@@ -580,6 +581,7 @@ en:
tech: Tech contact
valid: Valid
object_is_not_eligible_for_renewal: 'Object is not eligible for renewal'
+ object_is_not_holded: 'Object is not holded'
bank_statement_desc: 'Import file row will match only when matching following attributes:
ref number
payment amount
invoice number (the first numerical value in comment field).'
create_bank_statement: 'Create bank statement'
create_bank_transaction: 'Create bank transaction'
diff --git a/config/puma.rb b/config/puma.rb
index c7f311f81..1e19380dc 100644
--- a/config/puma.rb
+++ b/config/puma.rb
@@ -1,13 +1,13 @@
# Puma can serve each request in a thread from an internal thread pool.
-# The `threads` method setting takes two numbers a minimum and maximum.
+# The `threads` method setting takes two numbers: a minimum and maximum.
# Any libraries that use thread pools should be configured to match
# the maximum value specified for Puma. Default is set to 5 threads for minimum
-# and maximum, this matches the default thread size of Active Record.
+# and maximum; this matches the default thread size of Active Record.
#
-threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
+threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
threads threads_count, threads_count
-# Specifies the `port` that Puma will listen on to receive requests, default is 3000.
+# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
#
port ENV.fetch("PORT") { 3000 }
@@ -32,16 +32,25 @@ environment ENV.fetch("RAILS_ENV") { "development" }
#
# preload_app!
+# If you are preloading your application and using Active Record, it's
+# recommended that you close any connections to the database before workers
+# are forked to prevent connection leakage.
+#
+# before_fork do
+# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord)
+# end
+
# The code in the `on_worker_boot` will be called if you are using
# clustered mode by specifying a number of `workers`. After each worker
-# process is booted this block will be run, if you are using `preload_app!`
-# option you will want to use this block to reconnect to any threads
-# or connections that may have been created at application boot, Ruby
+# process is booted, this block will be run. If you are using the `preload_app!`
+# option, you will want to use this block to reconnect to any threads
+# or connections that may have been created at application boot, as Ruby
# cannot share connections between processes.
#
# on_worker_boot do
# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
# end
+#
# Allow puma to be restarted by `rails restart` command.
plugin :tmp_restart
diff --git a/config/routes.rb b/config/routes.rb
index f77529e4f..53d78dfa9 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -99,6 +99,7 @@ Rails.application.routes.draw do
get 'check'
get 'delete'
get 'search_contacts'
+ get 'remove_hold'
end
end
resources :domain_transfers, only: %i[new create]
diff --git a/config/spring.rb b/config/spring.rb
new file mode 100644
index 000000000..c9119b40c
--- /dev/null
+++ b/config/spring.rb
@@ -0,0 +1,6 @@
+%w(
+ .ruby-version
+ .rbenv-vars
+ tmp/restart.txt
+ tmp/caching-dev.txt
+).each { |path| Spring.watch(path) }
diff --git a/db/data/20150601083516_add_cert_common_name.rb b/db/data/20150601083516_add_cert_common_name.rb
index ef401b871..d0959e5b7 100644
--- a/db/data/20150601083516_add_cert_common_name.rb
+++ b/db/data/20150601083516_add_cert_common_name.rb
@@ -1,16 +1,15 @@
-class AddCertCommonName < ActiveRecord::Migration
+class AddCertCommonName < ActiveRecord::Migration[5.1]
def self.up
- Certificate.all.each do |x|
- if x.crt.blank? && x.csr.present?
- pc = x.parsed_csr.try(:subject).try(:to_s) || ''
- cn = pc.scan(/\/CN=(.+)/).flatten.first
- x.common_name = cn.split('/').first
- end
- x.save
- end
+ # Certificate.all.each do |x|
+ # if x.crt.blank? && x.csr.present?
+ # pc = x.parsed_csr.try(:subject).try(:to_s) || ''
+ # cn = pc.scan(/\/CN=(.+)/).flatten.first
+ # x.common_name = cn.split('/').first
+ # end
+ # x.save
+ # end
end
def self.down
- raise ActiveRecord::IrreversibleMigration
end
end
diff --git a/db/data/20150601083800_add_cert_md5.rb b/db/data/20150601083800_add_cert_md5.rb
index 5efe4e596..4db005177 100644
--- a/db/data/20150601083800_add_cert_md5.rb
+++ b/db/data/20150601083800_add_cert_md5.rb
@@ -1,28 +1,27 @@
-class AddCertMd5 < ActiveRecord::Migration
+class AddCertMd5 < ActiveRecord::Migration[5.1]
def self.up
- Certificate.all.each do |x|
- if x.crt.present? && x.csr.present?
- x.interface = Certificate::REGISTRAR
- x.md5 = OpenSSL::Digest::MD5.new(x.parsed_crt.to_der).to_s
-
- pc = x.parsed_crt.try(:subject).try(:to_s) || ''
- cn = pc.scan(/\/CN=(.+)/).flatten.first
- x.common_name = cn.split('/').first
- elsif x.crt.present? && x.csr.blank?
- x.interface = Certificate::API
- x.md5 = OpenSSL::Digest::MD5.new(x.parsed_crt.to_der).to_s
-
- pc = x.parsed_crt.try(:subject).try(:to_s) || ''
- cn = pc.scan(/\/CN=(.+)/).flatten.first
- x.common_name = cn.split('/').first
- elsif x.crt.blank? && x.csr.present?
- x.interface = Certificate::REGISTRAR
- end
- x.save
- end
+ # Certificate.all.each do |x|
+ # if x.crt.present? && x.csr.present?
+ # x.interface = Certificate::REGISTRAR
+ # x.md5 = OpenSSL::Digest::MD5.new(x.parsed_crt.to_der).to_s
+ #
+ # pc = x.parsed_crt.try(:subject).try(:to_s) || ''
+ # cn = pc.scan(/\/CN=(.+)/).flatten.first
+ # x.common_name = cn.split('/').first
+ # elsif x.crt.present? && x.csr.blank?
+ # x.interface = Certificate::API
+ # x.md5 = OpenSSL::Digest::MD5.new(x.parsed_crt.to_der).to_s
+ #
+ # pc = x.parsed_crt.try(:subject).try(:to_s) || ''
+ # cn = pc.scan(/\/CN=(.+)/).flatten.first
+ # x.common_name = cn.split('/').first
+ # elsif x.crt.blank? && x.csr.present?
+ # x.interface = Certificate::REGISTRAR
+ # end
+ # x.save
+ # end
end
def self.down
- raise ActiveRecord::IrreversibleMigration
end
end
diff --git a/db/data/20150609093515_add_renew_setting.rb b/db/data/20150609093515_add_renew_setting.rb
index f462c38cb..2d99aa448 100644
--- a/db/data/20150609093515_add_renew_setting.rb
+++ b/db/data/20150609093515_add_renew_setting.rb
@@ -1,9 +1,8 @@
-class AddRenewSetting < ActiveRecord::Migration
+class AddRenewSetting < ActiveRecord::Migration[5.1]
def self.up
- Setting.days_to_renew_domain_before_expire = 90
+ # Setting.days_to_renew_domain_before_expire = 90
end
def self.down
- raise ActiveRecord::IrreversibleMigration
end
end
diff --git a/db/data/20150610111019_add_expire_settings.rb b/db/data/20150610111019_add_expire_settings.rb
index 9f8b9cce8..6171536dd 100644
--- a/db/data/20150610111019_add_expire_settings.rb
+++ b/db/data/20150610111019_add_expire_settings.rb
@@ -1,10 +1,9 @@
-class AddExpireSettings < ActiveRecord::Migration
+class AddExpireSettings < ActiveRecord::Migration[5.1]
def self.up
- Setting.expire_warning_period = 15
- Setting.redemption_grace_period = 30
+ # Setting.expire_warning_period = 15
+ # Setting.redemption_grace_period = 30
end
def self.down
- raise ActiveRecord::IrreversibleMigration
end
end
diff --git a/db/data/20150612125720_refactor_domain_statuses.rb b/db/data/20150612125720_refactor_domain_statuses.rb
index 00e87b4d0..de0733e3f 100644
--- a/db/data/20150612125720_refactor_domain_statuses.rb
+++ b/db/data/20150612125720_refactor_domain_statuses.rb
@@ -1,15 +1,14 @@
-class RefactorDomainStatuses < ActiveRecord::Migration
+class RefactorDomainStatuses < ActiveRecord::Migration[5.1]
def self.up
- Domain.find_each do |x|
- statuses = []
- x.domain_statuses.each do |ds|
- statuses << ds.value
- end
- x.update_column('statuses', statuses)
- end
+ # Domain.find_each do |x|
+ # statuses = []
+ # x.domain_statuses.each do |ds|
+ # statuses << ds.value
+ # end
+ # x.update_column('statuses', statuses) if x.statuses.blank?
+ # end
end
def self.down
- raise ActiveRecord::IrreversibleMigration
end
end
diff --git a/db/data/20150707103801_refactor_contact_statuses.rb b/db/data/20150707103801_refactor_contact_statuses.rb
index be6312016..e1833dd66 100644
--- a/db/data/20150707103801_refactor_contact_statuses.rb
+++ b/db/data/20150707103801_refactor_contact_statuses.rb
@@ -1,15 +1,14 @@
-class RefactorContactStatuses < ActiveRecord::Migration
+class RefactorContactStatuses < ActiveRecord::Migration[5.1]
def self.up
- Contact.find_each do |contact|
- statuses = []
- contact.depricated_statuses.each do |ds|
- statuses << ds.value
- end
- contact.update_column('statuses', statuses)
- end
+ # Contact.find_each do |contact|
+ # statuses = []
+ # contact.depricated_statuses.each do |ds|
+ # statuses << ds.value
+ # end
+ # contact.update_column('statuses', statuses)
+ # end
end
def self.down
- raise ActiveRecord::IrreversibleMigration
end
end
diff --git a/db/data/20200225085234_convert_domain_delete_date.rb b/db/data/20200225085234_convert_domain_delete_date.rb
new file mode 100644
index 000000000..81f070927
--- /dev/null
+++ b/db/data/20200225085234_convert_domain_delete_date.rb
@@ -0,0 +1,19 @@
+class ConvertDomainDeleteDate < ActiveRecord::Migration[5.1]
+ def up
+ # processed_domain_count = 0
+ #
+ # Domain.transaction do
+ # Domain.find_each do |domain|
+ # next unless domain.delete_date
+ #
+ # domain.update_columns(delete_date: domain.delete_date + 1.day)
+ # processed_domain_count += 1
+ # end
+ # end
+ #
+ # puts "Domains processed: #{processed_domain_count}"
+ end
+
+ def down
+ end
+end
diff --git a/db/data/20200225085433_delete_orphaned_registrant_verifications.rb b/db/data/20200225085433_delete_orphaned_registrant_verifications.rb
new file mode 100644
index 000000000..73c270a6a
--- /dev/null
+++ b/db/data/20200225085433_delete_orphaned_registrant_verifications.rb
@@ -0,0 +1,18 @@
+class DeleteOrphanedRegistrantVerifications < ActiveRecord::Migration[5.1]
+ def up
+ # orphaned_registrant_verifications = RegistrantVerification.where.not(domain_id: Domain.ids)
+ # orphaned_registrant_verification_count = orphaned_registrant_verifications.count
+ # processed_registrant_verification_count = 0
+ #
+ # orphaned_registrant_verifications.each do |registrant_verification|
+ # registrant_verification.destroy!
+ # processed_registrant_verification_count += 1
+ # end
+ #
+ # puts "Processed: #{processed_registrant_verification_count} out of" \
+ # " #{orphaned_registrant_verification_count}"
+ end
+
+ def down
+ end
+end
diff --git a/db/data/20200225085539_regenerate_registrar_reference_numbers.rb b/db/data/20200225085539_regenerate_registrar_reference_numbers.rb
new file mode 100644
index 000000000..fbd2a5c5f
--- /dev/null
+++ b/db/data/20200225085539_regenerate_registrar_reference_numbers.rb
@@ -0,0 +1,19 @@
+class RegenerateRegistrarReferenceNumbers < ActiveRecord::Migration[5.1]
+ def up
+ # processed_registrar_count = 0
+ #
+ # Registrar.transaction do
+ # Registrar.all.each do |registrar|
+ # next unless registrar.reference_no.start_with?('RF')
+ #
+ # registrar.update_columns(reference_no: Billing::ReferenceNo.generate)
+ # processed_registrar_count += 1
+ # end
+ # end
+ #
+ # puts "Registrars processed: #{processed_registrar_count}"
+ end
+
+ def down
+ end
+end
diff --git a/db/data_schema.rb b/db/data_schema.rb
new file mode 100644
index 000000000..f4a3f5d8a
--- /dev/null
+++ b/db/data_schema.rb
@@ -0,0 +1,2 @@
+# encoding: UTF-8
+DataMigrate::Data.define(version: 20150707103801)
diff --git a/db/migrate/20200204103125_add_e_invoice_sent_at_to_invoice.rb b/db/migrate/20200204103125_add_e_invoice_sent_at_to_invoice.rb
new file mode 100644
index 000000000..e0e5f2cd0
--- /dev/null
+++ b/db/migrate/20200204103125_add_e_invoice_sent_at_to_invoice.rb
@@ -0,0 +1,5 @@
+class AddEInvoiceSentAtToInvoice < ActiveRecord::Migration[5.0]
+ def change
+ add_column :invoices, :e_invoice_sent_at, :datetime
+ end
+end
diff --git a/db/structure.sql b/db/structure.sql
index 9adad4a04..4132266e7 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -196,7 +196,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 (
@@ -236,7 +236,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 (
@@ -272,7 +272,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 (
@@ -304,7 +304,7 @@ ALTER SEQUENCE public.actions_id_seq OWNED BY public.actions.id;
--
--- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -; Tablespace:
+-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE public.ar_internal_metadata (
@@ -316,7 +316,7 @@ CREATE TABLE public.ar_internal_metadata (
--
--- Name: auctions; Type: TABLE; Schema: public; Owner: -; Tablespace:
+-- Name: auctions; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE public.auctions (
@@ -349,7 +349,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 (
@@ -385,7 +385,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 (
@@ -429,7 +429,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 (
@@ -462,7 +462,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 (
@@ -500,7 +500,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 (
@@ -558,7 +558,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 (
@@ -593,7 +593,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 (
@@ -634,7 +634,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 (
@@ -672,7 +672,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 (
@@ -709,7 +709,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 (
@@ -769,7 +769,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 (
@@ -801,7 +801,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 (
@@ -839,7 +839,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 (
@@ -910,7 +910,7 @@ ALTER SEQUENCE public.invoices_id_seq OWNED BY public.invoices.id;
--
--- Name: legal_documents; Type: TABLE; Schema: public; Owner: -; Tablespace:
+-- Name: legal_documents; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE public.legal_documents (
@@ -945,7 +945,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 (
@@ -983,7 +983,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 (
@@ -1021,7 +1021,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 (
@@ -1059,7 +1059,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 (
@@ -1097,7 +1097,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 (
@@ -1135,7 +1135,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 (
@@ -1173,7 +1173,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 (
@@ -1211,7 +1211,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 (
@@ -1250,7 +1250,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 (
@@ -1288,7 +1288,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 (
@@ -1326,7 +1326,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 (
@@ -1364,7 +1364,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 (
@@ -1402,7 +1402,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 (
@@ -1440,7 +1440,7 @@ ALTER SEQUENCE public.log_invoices_id_seq OWNED BY public.log_invoices.id;
--
--- Name: log_nameservers; Type: TABLE; Schema: public; Owner: -; Tablespace:
+-- Name: log_nameservers; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE public.log_nameservers (
@@ -1478,7 +1478,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 (
@@ -1516,7 +1516,7 @@ ALTER SEQUENCE public.log_notifications_id_seq OWNED BY public.log_notifications
--
--- Name: log_payment_orders; Type: TABLE; Schema: public; Owner: -; Tablespace:
+-- Name: log_payment_orders; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE public.log_payment_orders (
@@ -1554,7 +1554,7 @@ ALTER SEQUENCE public.log_payment_orders_id_seq OWNED BY public.log_payment_orde
--
--- Name: log_registrant_verifications; Type: TABLE; Schema: public; Owner: -; Tablespace:
+-- Name: log_registrant_verifications; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE public.log_registrant_verifications (
@@ -1591,7 +1591,7 @@ ALTER SEQUENCE public.log_registrant_verifications_id_seq OWNED BY public.log_re
--
--- Name: log_registrars; Type: TABLE; Schema: public; Owner: -; Tablespace:
+-- Name: log_registrars; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE public.log_registrars (
@@ -1629,7 +1629,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 (
@@ -1667,7 +1667,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 (
@@ -1705,7 +1705,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 (
@@ -1743,7 +1743,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 (
@@ -1781,7 +1781,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 (
@@ -1819,7 +1819,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 (
@@ -1857,7 +1857,7 @@ ALTER SEQUENCE public.notifications_id_seq OWNED BY public.notifications.id;
--
--- Name: payment_orders; Type: TABLE; Schema: public; Owner: -; Tablespace:
+-- Name: payment_orders; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE public.payment_orders (
@@ -1894,7 +1894,7 @@ ALTER SEQUENCE public.payment_orders_id_seq OWNED BY public.payment_orders.id;
--
--- Name: prices; Type: TABLE; Schema: public; Owner: -; Tablespace:
+-- Name: prices; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE public.prices (
@@ -1932,7 +1932,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 (
@@ -1974,7 +1974,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 (
@@ -2010,7 +2010,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 (
@@ -2063,7 +2063,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 (
@@ -2098,7 +2098,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 (
@@ -2107,7 +2107,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 (
@@ -2143,7 +2143,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 (
@@ -2195,7 +2195,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 (
@@ -2230,7 +2230,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 (
@@ -2266,7 +2266,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 (
@@ -2301,7 +2301,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 (
@@ -2722,7 +2722,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
@@ -2730,7 +2730,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
@@ -2738,7 +2738,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
@@ -2746,7 +2746,7 @@ ALTER TABLE ONLY public.actions
--
--- Name: ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+-- Name: ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY public.ar_internal_metadata
@@ -2754,7 +2754,7 @@ ALTER TABLE ONLY public.ar_internal_metadata
--
--- Name: auctions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+-- Name: auctions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY public.auctions
@@ -2762,7 +2762,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
@@ -2770,7 +2770,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
@@ -2778,7 +2778,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
@@ -2786,7 +2786,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
@@ -2794,7 +2794,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
@@ -2802,7 +2802,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
@@ -2810,7 +2810,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
@@ -2818,7 +2818,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
@@ -2826,7 +2826,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
@@ -2834,7 +2834,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
@@ -2842,7 +2842,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
@@ -2850,7 +2850,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
@@ -2858,7 +2858,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
@@ -2866,7 +2866,7 @@ ALTER TABLE ONLY public.invoices
--
--- 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
@@ -2874,7 +2874,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
@@ -2882,7 +2882,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
@@ -2890,7 +2890,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
@@ -2898,7 +2898,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
@@ -2906,7 +2906,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
@@ -2914,7 +2914,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
@@ -2922,7 +2922,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
@@ -2930,7 +2930,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
@@ -2938,7 +2938,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
@@ -2946,7 +2946,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
@@ -2954,7 +2954,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
@@ -2962,7 +2962,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
@@ -2970,7 +2970,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
@@ -2978,7 +2978,7 @@ ALTER TABLE ONLY public.log_invoices
--
--- 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
@@ -2986,7 +2986,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
@@ -2994,7 +2994,7 @@ ALTER TABLE ONLY public.log_notifications
--
--- Name: log_payment_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+-- Name: log_payment_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY public.log_payment_orders
@@ -3002,7 +3002,7 @@ ALTER TABLE ONLY public.log_payment_orders
--
--- Name: log_registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+-- Name: log_registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY public.log_registrant_verifications
@@ -3010,7 +3010,7 @@ ALTER TABLE ONLY public.log_registrant_verifications
--
--- 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
@@ -3018,7 +3018,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
@@ -3026,7 +3026,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
@@ -3034,7 +3034,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
@@ -3042,7 +3042,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
@@ -3050,7 +3050,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
@@ -3058,7 +3058,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
@@ -3066,7 +3066,7 @@ ALTER TABLE ONLY public.notifications
--
--- Name: payment_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+-- Name: payment_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY public.payment_orders
@@ -3074,7 +3074,7 @@ ALTER TABLE ONLY public.payment_orders
--
--- Name: prices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+-- Name: prices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY public.prices
@@ -3082,7 +3082,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
@@ -3090,7 +3090,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
@@ -3098,7 +3098,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
@@ -3106,7 +3106,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
@@ -3114,7 +3114,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
@@ -3122,7 +3122,7 @@ ALTER TABLE ONLY public.settings
--
--- Name: uniq_blocked_domains_name; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+-- Name: uniq_blocked_domains_name; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY public.blocked_domains
@@ -3130,7 +3130,7 @@ ALTER TABLE ONLY public.blocked_domains
--
--- 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
@@ -3138,7 +3138,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
@@ -3146,7 +3146,7 @@ ALTER TABLE ONLY public.domains
--
--- Name: uniq_reserved_domains_name; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+-- Name: uniq_reserved_domains_name; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY public.reserved_domains
@@ -3154,7 +3154,7 @@ ALTER TABLE ONLY public.reserved_domains
--
--- Name: uniq_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+-- Name: uniq_uuid; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY public.auctions
@@ -3162,7 +3162,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
@@ -3170,7 +3170,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
@@ -3178,7 +3178,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
@@ -3186,7 +3186,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
@@ -3194,7 +3194,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
@@ -3202,7 +3202,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
@@ -3210,7 +3210,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
@@ -3218,7 +3218,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
@@ -3226,7 +3226,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
@@ -3234,7 +3234,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
@@ -3242,7 +3242,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
@@ -3250,7 +3250,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
@@ -3258,7 +3258,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
@@ -3266,574 +3266,574 @@ 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_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_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_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_registrant_verifications_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
+-- Name: index_log_registrant_verifications_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_log_registrant_verifications_on_item_type_and_item_id ON public.log_registrant_verifications USING btree (item_type, item_id);
--
--- Name: index_log_registrant_verifications_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace:
+-- Name: index_log_registrant_verifications_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_log_registrant_verifications_on_whodunnit ON public.log_registrant_verifications USING btree (whodunnit);
--
--- Name: index_log_registrars_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
+-- Name: index_log_registrars_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; 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_payment_orders_on_invoice_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
+-- Name: index_payment_orders_on_invoice_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_payment_orders_on_invoice_id ON public.payment_orders USING btree (invoice_id);
--
--- Name: index_prices_on_zone_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
+-- Name: index_prices_on_zone_id; Type: INDEX; Schema: public; Owner: -; 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);
diff --git a/lib/tasks/data_migrations/.keep b/lib/tasks/data_migrations/.keep
new file mode 100644
index 000000000..e69de29bb
diff --git a/lib/tasks/data_migrations/convert_domain_delete_date.rake b/lib/tasks/data_migrations/convert_domain_delete_date.rake
deleted file mode 100644
index 7eeee5cf0..000000000
--- a/lib/tasks/data_migrations/convert_domain_delete_date.rake
+++ /dev/null
@@ -1,16 +0,0 @@
-namespace :data_migrations do
- task convert_domain_delete_date: :environment do
- processed_domain_count = 0
-
- Domain.transaction do
- Domain.find_each do |domain|
- next unless domain.delete_date
-
- domain.update_columns(delete_date: domain.delete_date + 1.day)
- processed_domain_count += 1
- end
- end
-
- puts "Domains processed: #{processed_domain_count}"
- end
-end
\ No newline at end of file
diff --git a/lib/tasks/data_migrations/delete_orphaned_registrant_verifications.rake b/lib/tasks/data_migrations/delete_orphaned_registrant_verifications.rake
deleted file mode 100644
index f65db547e..000000000
--- a/lib/tasks/data_migrations/delete_orphaned_registrant_verifications.rake
+++ /dev/null
@@ -1,15 +0,0 @@
-namespace :data_migrations do
- task delete_orphaned_registrant_verifications: :environment do
- orphaned_registrant_verifications = RegistrantVerification.where.not(domain_id: Domain.ids)
- orphaned_registrant_verification_count = orphaned_registrant_verifications.count
- processed_registrant_verification_count = 0
-
- orphaned_registrant_verifications.each do |registrant_verification|
- registrant_verification.destroy!
- processed_registrant_verification_count += 1
- end
-
- puts "Processed: #{processed_registrant_verification_count} out of" \
- " #{orphaned_registrant_verification_count}"
- end
-end
diff --git a/lib/tasks/data_migrations/regenerate_registrar_reference_numbers.rake b/lib/tasks/data_migrations/regenerate_registrar_reference_numbers.rake
deleted file mode 100644
index 6f6aaebe2..000000000
--- a/lib/tasks/data_migrations/regenerate_registrar_reference_numbers.rake
+++ /dev/null
@@ -1,16 +0,0 @@
-namespace :data_migrations do
- task regenerate_registrar_reference_numbers: [:environment] do
- processed_registrar_count = 0
-
- Registrar.transaction do
- Registrar.all.each do |registrar|
- next unless registrar.reference_no.start_with?('RF')
-
- registrar.update_columns(reference_no: Billing::ReferenceNo.generate)
- processed_registrar_count += 1
- end
- end
-
- puts "Registrars processed: #{processed_registrar_count}"
- end
-end
diff --git a/test/integration/contact/audit_log_test.rb b/test/integration/contact/audit_log_test.rb
index f0f6a4bf2..41699d595 100644
--- a/test/integration/contact/audit_log_test.rb
+++ b/test/integration/contact/audit_log_test.rb
@@ -5,7 +5,7 @@ class ContactAuditLogTest < ActionDispatch::IntegrationTest
contact = contacts(:john)
contact.legal_document_id = 1
- assert_difference 'contact.versions.count' do
+ assert_difference 'contact.versions.count', 1 do
contact.save!
end
@@ -13,4 +13,4 @@ class ContactAuditLogTest < ActionDispatch::IntegrationTest
assert_equal ({ legal_documents: [1] }).with_indifferent_access,
contact_version.children.with_indifferent_access
end
-end
\ No newline at end of file
+end
diff --git a/test/integration/domain/audit_log_test.rb b/test/integration/domain/audit_log_test.rb
index 292994ca3..a17fded0d 100644
--- a/test/integration/domain/audit_log_test.rb
+++ b/test/integration/domain/audit_log_test.rb
@@ -14,7 +14,7 @@ class DomainAuditLogTest < ActionDispatch::IntegrationTest
assert_equal registrant_id, domain.registrant_id
domain.legal_document_id = legal_document_id
- assert_difference 'domain.versions.count' do
+ assert_difference 'domain.versions.count', 1 do
domain.save!
end
@@ -26,4 +26,4 @@ class DomainAuditLogTest < ActionDispatch::IntegrationTest
assert_equal [legal_document_id], domain_version.children['legal_documents']
assert_equal [registrant_id], domain_version.children['registrant']
end
-end
\ No newline at end of file
+end
diff --git a/test/integration/tasks/data_migrations/regenerate_registrar_reference_numbers_test.rb b/test/integration/tasks/data_migrations/regenerate_registrar_reference_numbers_test.rb
deleted file mode 100644
index 946c6b898..000000000
--- a/test/integration/tasks/data_migrations/regenerate_registrar_reference_numbers_test.rb
+++ /dev/null
@@ -1,61 +0,0 @@
-require 'test_helper'
-
-class RegenerateRegistrarReferenceNumbersTaskTest < ActiveSupport::TestCase
- def test_regenerates_registrar_reference_numbers_to_estonian_format
- registrar = registrars(:bestnames)
- registrar.update_column(:reference_no, 'RF1111')
-
- capture_io { run_task }
- registrar.reload
-
- assert_not registrar.reference_no.start_with?('RF')
- end
-
- def test_bypasses_registrar_validation
- registrar = registrars(:invalid)
- registrar.update_column(:reference_no, 'RF1111')
- assert registrar.invalid?
-
- capture_io { run_task }
- registrar.reload
-
- assert_not registrar.reference_no.start_with?('RF')
- end
-
- def test_does_not_regenerate_when_the_task_is_run_again
- registrar = registrars(:bestnames)
- registrar.update!(reference_no: '1111')
-
- capture_io { run_task }
- registrar.reload
-
- assert_equal '1111', registrar.reference_no
- end
-
- def test_keeps_iso_reference_number_on_the_invoice_unchanged
- registrar = registrars(:bestnames)
- registrar.update_column(:reference_no, 'RF1111')
- invoice = invoices(:one)
- invoice.update!(reference_no: 'RF2222')
-
- capture_io { run_task }
- invoice.reload
-
- assert_equal 'RF2222', invoice.reference_no
- end
-
- def test_output
- registrar = registrars(:bestnames)
- registrar.update_column(:reference_no, 'RF1111')
-
- assert_output "Registrars processed: 1\n" do
- run_task
- end
- end
-
- private
-
- def run_task
- Rake::Task['data_migrations:regenerate_registrar_reference_numbers'].execute
- end
-end
diff --git a/test/jobs/send_e_invoice_job_test.rb b/test/jobs/send_e_invoice_job_test.rb
new file mode 100644
index 000000000..384479e92
--- /dev/null
+++ b/test/jobs/send_e_invoice_job_test.rb
@@ -0,0 +1,47 @@
+require 'test_helper'
+
+class SendEInvoiceJobTest < ActiveSupport::TestCase
+
+ def teardown
+ EInvoice.provider = EInvoice::Providers::TestProvider.new
+ EInvoice::Providers::TestProvider.deliveries.clear
+ end
+
+ def test_if_invoice_is_sended
+ @invoice = invoices(:one)
+ EInvoice.provider = EInvoice::Providers::TestProvider.new
+ EInvoice::Providers::TestProvider.deliveries.clear
+
+ assert_nothing_raised do
+ SendEInvoiceJob.enqueue(@invoice.id)
+ end
+ @invoice.reload
+
+ assert_not @invoice.e_invoice_sent_at.blank?
+ assert_equal 1, EInvoice::Providers::TestProvider.deliveries.count
+ end
+
+ def test_if_invoice_sending_retries
+ @invoice = invoices(:one)
+ provider_config = { password: nil,
+ test_mode: true }
+ EInvoice.provider = EInvoice::Providers::OmnivaProvider.new(provider_config)
+ stub_request(:get, "https://testfinance.post.ee/finance/erp/erpServices.wsdl").to_timeout
+
+ assert_raise HTTPClient::TimeoutError do
+ SendEInvoiceJob.enqueue(@invoice.id)
+ end
+ assert @invoicee_invoice_sent_at.blank?
+
+ EInvoice.provider = EInvoice::Providers::TestProvider.new
+ EInvoice::Providers::TestProvider.deliveries.clear
+
+ assert_nothing_raised do
+ SendEInvoiceJob.enqueue(@invoice.id)
+ end
+ @invoice.reload
+
+ assert_not @invoice.e_invoice_sent_at.blank?
+ assert_equal 1, EInvoice::Providers::TestProvider.deliveries.count
+ end
+end
diff --git a/test/learning/paper_trail_test.rb b/test/learning/paper_trail_test.rb
index 9396496b7..b7351c644 100644
--- a/test/learning/paper_trail_test.rb
+++ b/test/learning/paper_trail_test.rb
@@ -21,6 +21,25 @@ class PaperTrailLearningTest < ActiveSupport::TestCase
assert_respond_to @record.versions.first, :item_id
end
+ def test_returns_version_count_on_domains
+ @domain = domains(:airport)
+ @domain.save
+
+ assert_equal 1, @domain.versions.count
+
+ @domain.name = 'domain.test'
+ @domain.save!
+ assert_equal 2, @domain.versions.count
+ end
+
+ def test_returns_version_count_on_users
+ @user = users(:registrant)
+
+ @user.email = 'aaa@bbb.com'
+ @user.save!
+ assert_equal 1, @user.versions.count
+ end
+
def test_creates_new_version_upon_update
@record = Post.create!(title: 'old title')
original_record = @record.clone
@@ -40,7 +59,7 @@ class PaperTrailLearningTest < ActiveSupport::TestCase
@record = Post.create!(title: 'any')
assert_difference -> { @record.versions.size } do
- @record.touch_with_version
+ @record.paper_trail.touch_with_version
end
end
-end
\ No newline at end of file
+end
diff --git a/test/models/deposit_test.rb b/test/models/deposit_test.rb
index d8fc2d02a..171316f65 100644
--- a/test/models/deposit_test.rb
+++ b/test/models/deposit_test.rb
@@ -36,22 +36,22 @@ class DepositTest < ActiveSupport::TestCase
def test_amount_is_converted_from_string
@deposit.amount = "12.00"
- assert_equal(BigDecimal.new("12.00"), @deposit.amount)
+ assert_equal(BigDecimal("12.00"), @deposit.amount)
@deposit.amount = "12,11"
- assert_equal(BigDecimal.new("12.11"), @deposit.amount)
+ assert_equal(BigDecimal("12.11"), @deposit.amount)
end
def test_amount_is_converted_from_float
@deposit.amount = 12.0044
- assert_equal(BigDecimal.new("12.0044"), @deposit.amount)
+ assert_equal(BigDecimal("12.0044"), @deposit.amount)
@deposit.amount = 12.0144
- assert_equal(BigDecimal.new("12.0144"), @deposit.amount)
+ assert_equal(BigDecimal("12.0144"), @deposit.amount)
end
def test_amount_is_converted_from_nil
@deposit.amount = nil
- assert_equal(BigDecimal.new("0.00"), @deposit.amount)
+ assert_equal(BigDecimal("0.00"), @deposit.amount)
end
end
diff --git a/test/models/directo_test.rb b/test/models/directo_test.rb
index 9dbbf64d4..086ce567b 100644
--- a/test/models/directo_test.rb
+++ b/test/models/directo_test.rb
@@ -5,16 +5,38 @@ class DirectoTest < ActiveSupport::TestCase
@invoice = invoices(:one)
end
+ def test_monthly_invoices_max_range_raises_if_overlaps
+
+ Setting.directo_monthly_number_max = Setting.directo_monthly_number_last.to_i + Registrar.count - 1
+ error_message = 'Directo counter is out of period (max allowed number is smaller than last '\
+ 'counternumber plus Registrar\'s count)'
+
+ error = assert_raises RuntimeError do
+ Directo.send_monthly_invoices
+ end
+
+ assert_equal error_message, error.message
+ end
+
def test_xml_is_include_transaction_date
@invoice.update(total: @invoice.account_activity.bank_transaction.sum)
@invoice.account_activity.bank_transaction.update(paid_at: Time.zone.now)
+ response = <<-XML
+
+
+
+
+ XML
+
stub_request(:post, ENV['directo_invoice_url']).with do |request|
request.body.include? 'TransactionDate'
- end
+ end.to_return(status: 200, body: response)
assert_nothing_raised do
Directo.send_receipts
end
+
+ assert_not_empty @invoice.directo_records.first.request
end
end
diff --git a/test/models/dns/domain_name_test.rb b/test/models/dns/domain_name_test.rb
index bd83076bc..4f8922d32 100644
--- a/test/models/dns/domain_name_test.rb
+++ b/test/models/dns/domain_name_test.rb
@@ -13,6 +13,8 @@ class AuctionDoubleTest < ActiveSupport::TestCase
end
class DNS::DomainNameTest < ActiveSupport::TestCase
+ fixtures 'whois/records'
+
def test_available_when_not_at_auction
domain_name = DNS::DomainName.new('auction.test')
auctions(:one).update!(domain: 'auction.test', status: Auction.statuses[:domain_registered])
diff --git a/test/support/rails5_assertions.rb b/test/support/rails5_assertions.rb
deleted file mode 100644
index a11bb3ef1..000000000
--- a/test/support/rails5_assertions.rb
+++ /dev/null
@@ -1,96 +0,0 @@
-# Built-in since Rails 5.1
-
-module ActiveSupport
- module Testing
- module Assertions
- UNTRACKED = Object.new # :nodoc:
-
- # Assertion that the result of evaluating an expression is changed before
- # and after invoking the passed in block.
- #
- # assert_changes 'Status.all_good?' do
- # post :create, params: { status: { ok: false } }
- # end
- #
- # You can pass the block as a string to be evaluated in the context of
- # the block. A lambda can be passed for the block as well.
- #
- # assert_changes -> { Status.all_good? } do
- # post :create, params: { status: { ok: false } }
- # end
- #
- # The assertion is useful to test side effects. The passed block can be
- # anything that can be converted to string with #to_s.
- #
- # assert_changes :@object do
- # @object = 42
- # end
- #
- # The keyword arguments :from and :to can be given to specify the
- # expected initial value and the expected value after the block was
- # executed.
- #
- # assert_changes :@object, from: nil, to: :foo do
- # @object = :foo
- # end
- #
- # An error message can be specified.
- #
- # assert_changes -> { Status.all_good? }, 'Expected the status to be bad' do
- # post :create, params: { status: { incident: true } }
- # end
- def assert_changes(expression, message = nil, from: UNTRACKED, to: UNTRACKED, &block)
- exp = expression.respond_to?(:call) ? expression : -> { eval(expression.to_s, block.binding) }
-
- before = exp.call
- retval = yield
-
- unless from == UNTRACKED
- error = "#{expression.inspect} isn't #{from.inspect}"
- error = "#{message}.\n#{error}" if message
- assert from === before, error
- end
-
- after = exp.call
-
- if to == UNTRACKED
- error = "#{expression.inspect} didn't changed"
- error = "#{message}.\n#{error}" if message
- assert_not_equal before, after, error
- else
- error = "#{expression.inspect} didn't change to #{to}"
- error = "#{message}.\n#{error}" if message
- assert to === after, error
- end
-
- retval
- end
-
- # Assertion that the result of evaluating an expression is changed before
- # and after invoking the passed in block.
- #
- # assert_no_changes 'Status.all_good?' do
- # post :create, params: { status: { ok: true } }
- # end
- #
- # An error message can be specified.
- #
- # assert_no_changes -> { Status.all_good? }, 'Expected the status to be good' do
- # post :create, params: { status: { ok: false } }
- # end
- def assert_no_changes(expression, message = nil, &block)
- exp = expression.respond_to?(:call) ? expression : -> { eval(expression.to_s, block.binding) }
-
- before = exp.call
- retval = yield
- after = exp.call
-
- error = "#{expression.inspect} did change to #{after}"
- error = "#{message}.\n#{error}" if message
- assert_equal before, after, error
-
- retval
- end
- end
- end
-end
diff --git a/test/system/admin_area/domains_test.rb b/test/system/admin_area/domains_test.rb
index abd1d93fb..05e7d60f3 100644
--- a/test/system/admin_area/domains_test.rb
+++ b/test/system/admin_area/domains_test.rb
@@ -35,4 +35,15 @@ class AdminDomainsTestTest < ApplicationSystemTestCase
assert_text 'deleteCandidate status has been removed'
assert_no_link 'Remove deleteCandidate status'
end
+
+ def test_remove_domain_status
+ @domain.update!(statuses: [DomainStatus::SERVER_REGISTRANT_CHANGE_PROHIBITED])
+
+ visit edit_admin_domain_url(@domain)
+
+ click_link_or_button 'Delete'
+ click_link_or_button 'Save'
+
+ assert_text 'Domain updated!'
+ end
end
diff --git a/test/tasks/data_migrations/convert_domain_delete_date_test.rb b/test/tasks/data_migrations/convert_domain_delete_date_test.rb
deleted file mode 100644
index 709334b52..000000000
--- a/test/tasks/data_migrations/convert_domain_delete_date_test.rb
+++ /dev/null
@@ -1,61 +0,0 @@
-require 'test_helper'
-
-class ConvertDomainDeleteDateTaskTest < ActiveSupport::TestCase
- setup do
- @domain = domains(:shop)
- end
-
- def test_moves_domain_delete_date_one_day_ahead
- @domain.update!(delete_date: '2010-07-05')
-
- capture_io do
- run_task
- end
- @domain.reload
-
- assert_equal Date.parse('2010-07-06'), @domain.delete_date
- end
-
- def test_processes_invalid_domains
- @domain = domains(:invalid)
- @domain.update_columns(delete_date: '2010-07-05')
-
- capture_io do
- run_task
- end
- @domain.reload
-
- assert_equal Date.parse('2010-07-06'), @domain.delete_date
- end
-
- def test_skips_non_expired_domains
- @domain.update!(delete_date: nil)
-
- assert_nothing_raised do
- capture_io do
- run_task
- end
- end
- end
-
- def test_output
- eliminate_effect_of_all_domains_except(@domain)
- @domain.update!(delete_date: '2010-07-05')
-
- assert_output "Domains processed: 1\n" do
- run_task
- end
- end
-
- private
-
- def eliminate_effect_of_all_domains_except(domain)
- Domain.connection.disable_referential_integrity do
- Domain.where("id != #{domain.id}").delete_all
- end
- end
-
- def run_task
- Rake::Task['data_migrations:convert_domain_delete_date'].execute
- end
-end
\ No newline at end of file
diff --git a/test/tasks/data_migrations/delete_orphaned_registrant_verifications_test.rb b/test/tasks/data_migrations/delete_orphaned_registrant_verifications_test.rb
deleted file mode 100644
index df576332e..000000000
--- a/test/tasks/data_migrations/delete_orphaned_registrant_verifications_test.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-require 'test_helper'
-
-class ArchiveOrphanedRegistrantVerificationsTest < ActiveSupport::TestCase
- def test_deletes_orphaned_registrant_verifications
- create_orphaned_registrant_verification
-
- assert_difference 'RegistrantVerification.count', -1 do
- capture_io do
- run_task
- end
- end
- end
-
- def test_keeps_non_orphaned_registrant_verifications_intact
- assert_no_difference 'RegistrantVerification.count' do
- capture_io do
- run_task
- end
- end
- end
-
- def test_output
- create_orphaned_registrant_verification
-
- assert_output "Processed: 1 out of 1\n" do
- run_task
- end
- end
-
- private
-
- def create_orphaned_registrant_verification
- non_existent_domain_id = 55
- assert_not_includes Domain.ids, non_existent_domain_id
-
- RegistrantVerification.connection.disable_referential_integrity do
- registrant_verifications(:one).update_columns(domain_id: non_existent_domain_id)
- end
- end
-
- def run_task
- Rake::Task['data_migrations:delete_orphaned_registrant_verifications'].execute end
-end
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 4cd632ea2..efdbc288f 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -16,7 +16,6 @@ require 'minitest/mock'
require 'capybara/rails'
require 'capybara/minitest'
require 'webmock/minitest'
-require 'support/rails5_assertions' # Remove once upgraded to Rails 5.1
require 'support/assertions/epp_assertions'