mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 01:17:18 +02:00
Create blocked domains #2564
This commit is contained in:
parent
cd277c25ed
commit
d93d43e75c
13 changed files with 254 additions and 80 deletions
22
app/controllers/admin/blocked_domains_controller.rb
Normal file
22
app/controllers/admin/blocked_domains_controller.rb
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
class Admin::BlockedDomainsController < AdminController
|
||||||
|
load_and_authorize_resource
|
||||||
|
|
||||||
|
def index
|
||||||
|
bd = BlockedDomain.first_or_initialize
|
||||||
|
@blocked_domains = bd.names.join("\n")
|
||||||
|
end
|
||||||
|
|
||||||
|
def create
|
||||||
|
names = params[:blocked_domains].split("\r\n").map(&:strip)
|
||||||
|
|
||||||
|
bd = BlockedDomain.first_or_create
|
||||||
|
|
||||||
|
if bd.update(names: names)
|
||||||
|
flash[:notice] = I18n.t('record_updated')
|
||||||
|
else
|
||||||
|
flash.now[:alert] = I18n.t('failed_to_update_record')
|
||||||
|
end
|
||||||
|
|
||||||
|
redirect_to :back
|
||||||
|
end
|
||||||
|
end
|
|
@ -106,6 +106,7 @@ class Ability
|
||||||
def admin
|
def admin
|
||||||
customer_service
|
customer_service
|
||||||
can :manage, Setting
|
can :manage, Setting
|
||||||
|
can :manage, BlockedDomain
|
||||||
can :manage, ZonefileSetting
|
can :manage, ZonefileSetting
|
||||||
can :manage, DomainVersion
|
can :manage, DomainVersion
|
||||||
can :manage, Pricelist
|
can :manage, Pricelist
|
||||||
|
|
5
app/models/blocked_domain.rb
Normal file
5
app/models/blocked_domain.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
class BlockedDomain < ActiveRecord::Base
|
||||||
|
include Versions
|
||||||
|
|
||||||
|
after_initialize -> { self.names = [] if names.nil? }
|
||||||
|
end
|
|
@ -62,7 +62,8 @@ class Epp::Domain < Domain
|
||||||
],
|
],
|
||||||
'2302' => [ # Object exists
|
'2302' => [ # Object exists
|
||||||
[:name_dirty, :taken, { value: { obj: 'name', val: name_dirty } }],
|
[:name_dirty, :taken, { value: { obj: 'name', val: name_dirty } }],
|
||||||
[:name_dirty, :reserved, { value: { obj: 'name', val: name_dirty } }]
|
[:name_dirty, :reserved, { value: { obj: 'name', val: name_dirty } }],
|
||||||
|
[:name_dirty, :blocked, { value: { obj: 'name', val: name_dirty } }]
|
||||||
],
|
],
|
||||||
'2304' => [ # Object status prohibits operation
|
'2304' => [ # Object status prohibits operation
|
||||||
[:base, :domain_status_prohibits_operation]
|
[:base, :domain_status_prohibits_operation]
|
||||||
|
|
4
app/models/version/blocked_domain_version.rb
Normal file
4
app/models/version/blocked_domain_version.rb
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
class BlockedDomainVersion < PaperTrail::Version
|
||||||
|
self.table_name = :log_blocked_domains
|
||||||
|
self.sequence_name = :log_blocked_domains_id_seq
|
||||||
|
end
|
|
@ -1,11 +1,17 @@
|
||||||
class DomainNameValidator < ActiveModel::EachValidator
|
class DomainNameValidator < ActiveModel::EachValidator
|
||||||
|
# rubocop: disable Metrics/PerceivedComplexity
|
||||||
|
# rubocop: disable Metrics/CyclomaticComplexity
|
||||||
def validate_each(record, attribute, value)
|
def validate_each(record, attribute, value)
|
||||||
if !self.class.validate_format(value)
|
if !self.class.validate_format(value)
|
||||||
record.errors[attribute] << (options[:message] || record.errors.generate_message(attribute, :invalid))
|
record.errors[attribute] << (options[:message] || record.errors.generate_message(attribute, :invalid))
|
||||||
|
elsif !self.class.validate_blocked(value)
|
||||||
|
record.errors.add(attribute, (options[:message] || record.errors.generate_message(attribute, :blocked)))
|
||||||
elsif !self.class.validate_reservation(value)
|
elsif !self.class.validate_reservation(value)
|
||||||
record.errors.add(attribute, (options[:message] || record.errors.generate_message(attribute, :reserved)))
|
record.errors.add(attribute, (options[:message] || record.errors.generate_message(attribute, :reserved)))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
# rubocop: enable Metrics/PerceivedComplexity
|
||||||
|
# rubocop: enable Metrics/CyclomaticComplexity
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
def validate_format(value)
|
def validate_format(value)
|
||||||
|
@ -31,6 +37,11 @@ class DomainNameValidator < ActiveModel::EachValidator
|
||||||
# rubocop: enable Style/DoubleNegation
|
# rubocop: enable Style/DoubleNegation
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def validate_blocked(value)
|
||||||
|
return true unless value
|
||||||
|
BlockedDomain.where("names @> ?::varchar[]", "{#{value}}").count == 0
|
||||||
|
end
|
||||||
|
|
||||||
def validate_reservation(value)
|
def validate_reservation(value)
|
||||||
return true unless value
|
return true unless value
|
||||||
!ReservedDomain.exists?(name: value.mb_chars.downcase.strip)
|
!ReservedDomain.exists?(name: value.mb_chars.downcase.strip)
|
||||||
|
|
10
app/views/admin/blocked_domains/index.haml
Normal file
10
app/views/admin/blocked_domains/index.haml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
= render 'shared/title', name: t(:blocked_domains)
|
||||||
|
|
||||||
|
= form_tag([:admin, :blocked_domains]) do |f|
|
||||||
|
.row
|
||||||
|
.col-md-12
|
||||||
|
= text_area_tag :blocked_domains, @blocked_domains, class: 'form-control', rows: 30
|
||||||
|
%hr
|
||||||
|
.row
|
||||||
|
.col-md-12.text-right
|
||||||
|
%button.btn.btn-warning=t(:save)
|
|
@ -59,9 +59,7 @@
|
||||||
%li.dropdown-header= t(:system)
|
%li.dropdown-header= t(:system)
|
||||||
%li= link_to t(:settings), admin_settings_path
|
%li= link_to t(:settings), admin_settings_path
|
||||||
%li= link_to t(:zonefile), admin_zonefile_settings_path
|
%li= link_to t(:zonefile), admin_zonefile_settings_path
|
||||||
%li.dropdown-header= t(:system)
|
%li= link_to t(:blocked_domains), admin_blocked_domains_path
|
||||||
%li= link_to t(:settings), admin_settings_path
|
|
||||||
%li= link_to t(:zonefile), admin_zonefile_settings_path
|
|
||||||
-# %li= link_to t(:domains_history), admin_domain_versions_path
|
-# %li= link_to t(:domains_history), admin_domain_versions_path
|
||||||
%li= link_to t(:epp_logs), admin_epp_logs_path
|
%li= link_to t(:epp_logs), admin_epp_logs_path
|
||||||
%li= link_to t(:repp_logs), admin_repp_logs_path
|
%li= link_to t(:repp_logs), admin_repp_logs_path
|
||||||
|
|
|
@ -62,7 +62,8 @@ en:
|
||||||
key_data_not_allowed: 'keyData object is not allowed'
|
key_data_not_allowed: 'keyData object is not allowed'
|
||||||
name_dirty:
|
name_dirty:
|
||||||
invalid: 'Domain name is invalid'
|
invalid: 'Domain name is invalid'
|
||||||
reserved: 'Domain name is reserved or restricted'
|
reserved: 'Domain name is reserved'
|
||||||
|
blocked: 'Domain name is blocked'
|
||||||
taken: 'Domain name already exists'
|
taken: 'Domain name already exists'
|
||||||
puny_label:
|
puny_label:
|
||||||
too_long: 'Domain name is too long (maximum is 63 characters)'
|
too_long: 'Domain name is too long (maximum is 63 characters)'
|
||||||
|
@ -852,3 +853,4 @@ en:
|
||||||
registry_state: 'State / Province'
|
registry_state: 'State / Province'
|
||||||
registry_zip: 'Postcode'
|
registry_zip: 'Postcode'
|
||||||
registry_country_code: 'Country'
|
registry_country_code: 'Country'
|
||||||
|
blocked_domains: 'Blocked domains'
|
||||||
|
|
|
@ -189,6 +189,8 @@ Rails.application.routes.draw do
|
||||||
|
|
||||||
resources :settings
|
resources :settings
|
||||||
|
|
||||||
|
resources :blocked_domains
|
||||||
|
|
||||||
resources :registrars do
|
resources :registrars do
|
||||||
resources :api_users
|
resources :api_users
|
||||||
resources :white_ips
|
resources :white_ips
|
||||||
|
|
25
db/migrate/20150701074344_create_blocked_domains.rb
Normal file
25
db/migrate/20150701074344_create_blocked_domains.rb
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
class CreateBlockedDomains < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :blocked_domains do |t|
|
||||||
|
t.string :names, array: true
|
||||||
|
t.timestamps
|
||||||
|
t.string "creator_str"
|
||||||
|
t.string "updator_str"
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "log_blocked_domains", force: :cascade do |t|
|
||||||
|
t.string "item_type", null: false
|
||||||
|
t.integer "item_id", null: false
|
||||||
|
t.string "event", null: false
|
||||||
|
t.string "whodunnit"
|
||||||
|
t.json "object"
|
||||||
|
t.json "object_changes"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.string "session"
|
||||||
|
t.json "children"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "log_blocked_domains", ["item_type", "item_id"], name: "index_log_blocked_domains_on_item_type_and_item_id", using: :btree
|
||||||
|
add_index "log_blocked_domains", ["whodunnit"], name: "index_log_blocked_domains_on_whodunnit", using: :btree
|
||||||
|
end
|
||||||
|
end
|
28
db/seeds.rb
28
db/seeds.rb
|
@ -119,17 +119,17 @@ ZonefileSetting.where({
|
||||||
master_nameserver: 'ns.tld.ee'
|
master_nameserver: 'ns.tld.ee'
|
||||||
}).first_or_create!
|
}).first_or_create!
|
||||||
|
|
||||||
Registrar.where(
|
# Registrar.where(
|
||||||
name: 'EIS',
|
# name: 'EIS',
|
||||||
reg_no: '90010019',
|
# reg_no: '90010019',
|
||||||
phone: '+3727271000',
|
# phone: '+3727271000',
|
||||||
country_code: 'EE',
|
# country_code: 'EE',
|
||||||
vat_no: 'EE101286464',
|
# vat_no: 'EE101286464',
|
||||||
email: 'info@internet.ee',
|
# email: 'info@internet.ee',
|
||||||
state: 'Harjumaa',
|
# state: 'Harjumaa',
|
||||||
city: 'Tallinn',
|
# city: 'Tallinn',
|
||||||
street: 'Paldiski mnt 80',
|
# street: 'Paldiski mnt 80',
|
||||||
zip: '10617',
|
# zip: '10617',
|
||||||
url: 'www.internet.ee',
|
# url: 'www.internet.ee',
|
||||||
code: 'EIS'
|
# code: 'EIS'
|
||||||
).first_or_create!
|
# ).first_or_create!
|
||||||
|
|
215
db/structure.sql
215
db/structure.sql
|
@ -41,7 +41,7 @@ CREATE FUNCTION generate_zonefile(i_origin character varying) RETURNS text
|
||||||
ret text;
|
ret text;
|
||||||
BEGIN
|
BEGIN
|
||||||
-- define filters
|
-- define filters
|
||||||
include_filter = '%' || i_origin;
|
include_filter = '%.' || i_origin;
|
||||||
|
|
||||||
-- for %.%.%
|
-- for %.%.%
|
||||||
IF i_origin ~ '\.' THEN
|
IF i_origin ~ '\.' THEN
|
||||||
|
@ -74,7 +74,7 @@ CREATE FUNCTION generate_zonefile(i_origin character varying) RETURNS text
|
||||||
SELECT concat(d.name_puny, '. IN NS ', ns.hostname, '.')
|
SELECT concat(d.name_puny, '. IN NS ', ns.hostname, '.')
|
||||||
FROM domains d
|
FROM domains d
|
||||||
JOIN nameservers ns ON ns.domain_id = d.id
|
JOIN nameservers ns ON ns.domain_id = d.id
|
||||||
WHERE d.name LIKE include_filter AND d.name NOT LIKE exclude_filter
|
WHERE d.name LIKE include_filter AND d.name NOT LIKE exclude_filter OR d.name = i_origin
|
||||||
ORDER BY d.name
|
ORDER BY d.name
|
||||||
),
|
),
|
||||||
chr(10)
|
chr(10)
|
||||||
|
@ -198,7 +198,7 @@ CREATE TABLE account_activities (
|
||||||
id integer NOT NULL,
|
id integer NOT NULL,
|
||||||
account_id integer,
|
account_id integer,
|
||||||
invoice_id integer,
|
invoice_id integer,
|
||||||
sum numeric(10,2),
|
sum numeric(8,2),
|
||||||
currency character varying,
|
currency character varying,
|
||||||
bank_transaction_id integer,
|
bank_transaction_id integer,
|
||||||
created_at timestamp without time zone,
|
created_at timestamp without time zone,
|
||||||
|
@ -236,7 +236,7 @@ CREATE TABLE accounts (
|
||||||
id integer NOT NULL,
|
id integer NOT NULL,
|
||||||
registrar_id integer,
|
registrar_id integer,
|
||||||
account_type character varying,
|
account_type character varying,
|
||||||
balance numeric(10,2) DEFAULT 0 NOT NULL,
|
balance numeric(8,2) DEFAULT 0.0 NOT NULL,
|
||||||
created_at timestamp without time zone,
|
created_at timestamp without time zone,
|
||||||
updated_at timestamp without time zone,
|
updated_at timestamp without time zone,
|
||||||
currency character varying,
|
currency character varying,
|
||||||
|
@ -394,7 +394,7 @@ CREATE TABLE bank_transactions (
|
||||||
buyer_name character varying,
|
buyer_name character varying,
|
||||||
document_no character varying,
|
document_no character varying,
|
||||||
description character varying,
|
description character varying,
|
||||||
sum numeric(10,2),
|
sum numeric(8,2),
|
||||||
reference_no character varying,
|
reference_no character varying,
|
||||||
paid_at timestamp without time zone,
|
paid_at timestamp without time zone,
|
||||||
created_at timestamp without time zone,
|
created_at timestamp without time zone,
|
||||||
|
@ -435,7 +435,7 @@ CREATE TABLE banklink_transactions (
|
||||||
vk_rec_id character varying,
|
vk_rec_id character varying,
|
||||||
vk_stamp character varying,
|
vk_stamp character varying,
|
||||||
vk_t_no character varying,
|
vk_t_no character varying,
|
||||||
vk_amount numeric(10,2),
|
vk_amount numeric(8,2),
|
||||||
vk_curr character varying,
|
vk_curr character varying,
|
||||||
vk_rec_acc character varying,
|
vk_rec_acc character varying,
|
||||||
vk_rec_name character varying,
|
vk_rec_name character varying,
|
||||||
|
@ -472,6 +472,39 @@ CREATE SEQUENCE banklink_transactions_id_seq
|
||||||
ALTER SEQUENCE banklink_transactions_id_seq OWNED BY banklink_transactions.id;
|
ALTER SEQUENCE banklink_transactions_id_seq OWNED BY banklink_transactions.id;
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: blocked_domains; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE blocked_domains (
|
||||||
|
id integer NOT NULL,
|
||||||
|
names character varying[],
|
||||||
|
created_at timestamp without time zone,
|
||||||
|
updated_at timestamp without time zone,
|
||||||
|
creator_str character varying,
|
||||||
|
updator_str character varying
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: blocked_domains_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE SEQUENCE blocked_domains_id_seq
|
||||||
|
START WITH 1
|
||||||
|
INCREMENT BY 1
|
||||||
|
NO MINVALUE
|
||||||
|
NO MAXVALUE
|
||||||
|
CACHE 1;
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: blocked_domains_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER SEQUENCE blocked_domains_id_seq OWNED BY blocked_domains.id;
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: cached_nameservers; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
-- Name: cached_nameservers; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||||
--
|
--
|
||||||
|
@ -639,6 +672,15 @@ CREATE SEQUENCE countries_id_seq
|
||||||
ALTER SEQUENCE countries_id_seq OWNED BY countries.id;
|
ALTER SEQUENCE countries_id_seq OWNED BY countries.id;
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: data_migrations; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE data_migrations (
|
||||||
|
version character varying NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: delegation_signers; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
-- Name: delegation_signers; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||||
--
|
--
|
||||||
|
@ -951,7 +993,7 @@ CREATE TABLE invoice_items (
|
||||||
description character varying NOT NULL,
|
description character varying NOT NULL,
|
||||||
unit character varying,
|
unit character varying,
|
||||||
amount integer,
|
amount integer,
|
||||||
price numeric(10,2),
|
price numeric(8,2),
|
||||||
created_at timestamp without time zone,
|
created_at timestamp without time zone,
|
||||||
updated_at timestamp without time zone,
|
updated_at timestamp without time zone,
|
||||||
creator_str character varying,
|
creator_str character varying,
|
||||||
|
@ -992,7 +1034,7 @@ CREATE TABLE invoices (
|
||||||
currency character varying NOT NULL,
|
currency character varying NOT NULL,
|
||||||
description character varying,
|
description character varying,
|
||||||
reference_no character varying,
|
reference_no character varying,
|
||||||
vat_prc numeric(10,2) NOT NULL,
|
vat_prc numeric(8,2) NOT NULL,
|
||||||
paid_at timestamp without time zone,
|
paid_at timestamp without time zone,
|
||||||
seller_id integer,
|
seller_id integer,
|
||||||
seller_name character varying NOT NULL,
|
seller_name character varying NOT NULL,
|
||||||
|
@ -1025,7 +1067,7 @@ CREATE TABLE invoices (
|
||||||
updator_str character varying,
|
updator_str character varying,
|
||||||
number integer,
|
number integer,
|
||||||
cancelled_at timestamp without time zone,
|
cancelled_at timestamp without time zone,
|
||||||
sum_cache numeric(10,2)
|
sum_cache numeric(8,2)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1349,6 +1391,43 @@ CREATE SEQUENCE log_bank_transactions_id_seq
|
||||||
ALTER SEQUENCE log_bank_transactions_id_seq OWNED BY log_bank_transactions.id;
|
ALTER SEQUENCE log_bank_transactions_id_seq OWNED BY log_bank_transactions.id;
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: log_blocked_domains; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE log_blocked_domains (
|
||||||
|
id integer NOT NULL,
|
||||||
|
item_type character varying NOT NULL,
|
||||||
|
item_id integer NOT NULL,
|
||||||
|
event character varying NOT NULL,
|
||||||
|
whodunnit character varying,
|
||||||
|
object json,
|
||||||
|
object_changes json,
|
||||||
|
created_at timestamp without time zone,
|
||||||
|
session character varying,
|
||||||
|
children json
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: log_blocked_domains_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE SEQUENCE log_blocked_domains_id_seq
|
||||||
|
START WITH 1
|
||||||
|
INCREMENT BY 1
|
||||||
|
NO MINVALUE
|
||||||
|
NO MAXVALUE
|
||||||
|
CACHE 1;
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: log_blocked_domains_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER SEQUENCE log_blocked_domains_id_seq OWNED BY log_blocked_domains.id;
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: log_certificates; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
-- Name: log_certificates; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||||
--
|
--
|
||||||
|
@ -2287,7 +2366,7 @@ CREATE TABLE pricelists (
|
||||||
id integer NOT NULL,
|
id integer NOT NULL,
|
||||||
"desc" character varying,
|
"desc" character varying,
|
||||||
category character varying,
|
category character varying,
|
||||||
price_cents numeric(8,2) DEFAULT 0 NOT NULL,
|
price_cents numeric(8,2) DEFAULT 0.0 NOT NULL,
|
||||||
price_currency character varying DEFAULT 'EUR'::character varying NOT NULL,
|
price_currency character varying DEFAULT 'EUR'::character varying NOT NULL,
|
||||||
valid_from timestamp without time zone,
|
valid_from timestamp without time zone,
|
||||||
valid_to timestamp without time zone,
|
valid_to timestamp without time zone,
|
||||||
|
@ -2325,8 +2404,8 @@ ALTER SEQUENCE pricelists_id_seq OWNED BY pricelists.id;
|
||||||
|
|
||||||
CREATE TABLE que_jobs (
|
CREATE TABLE que_jobs (
|
||||||
priority smallint DEFAULT 100 NOT NULL,
|
priority smallint DEFAULT 100 NOT NULL,
|
||||||
run_at timestamp with time zone DEFAULT now() NOT NULL,
|
run_at timestamp without time zone DEFAULT '2015-06-30 14:16:49.190473'::timestamp without time zone NOT NULL,
|
||||||
job_id bigint NOT NULL,
|
job_id bigint DEFAULT 0 NOT NULL,
|
||||||
job_class text NOT NULL,
|
job_class text NOT NULL,
|
||||||
args json DEFAULT '[]'::json NOT NULL,
|
args json DEFAULT '[]'::json NOT NULL,
|
||||||
error_count integer DEFAULT 0 NOT NULL,
|
error_count integer DEFAULT 0 NOT NULL,
|
||||||
|
@ -2335,32 +2414,6 @@ CREATE TABLE que_jobs (
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: TABLE que_jobs; Type: COMMENT; Schema: public; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
COMMENT ON TABLE que_jobs IS '3';
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: que_jobs_job_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE SEQUENCE que_jobs_job_id_seq
|
|
||||||
START WITH 1
|
|
||||||
INCREMENT BY 1
|
|
||||||
NO MINVALUE
|
|
||||||
NO MAXVALUE
|
|
||||||
CACHE 1;
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: que_jobs_job_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
ALTER SEQUENCE que_jobs_job_id_seq OWNED BY que_jobs.job_id;
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: registrant_verifications; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
-- Name: registrant_verifications; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||||
--
|
--
|
||||||
|
@ -2551,7 +2604,7 @@ CREATE TABLE users (
|
||||||
crt text,
|
crt text,
|
||||||
type character varying,
|
type character varying,
|
||||||
registrant_ident character varying,
|
registrant_ident character varying,
|
||||||
encrypted_password character varying DEFAULT ''::character varying,
|
encrypted_password character varying DEFAULT ''::character varying NOT NULL,
|
||||||
remember_created_at timestamp without time zone,
|
remember_created_at timestamp without time zone,
|
||||||
failed_attempts integer DEFAULT 0 NOT NULL,
|
failed_attempts integer DEFAULT 0 NOT NULL,
|
||||||
locked_at timestamp without time zone
|
locked_at timestamp without time zone
|
||||||
|
@ -2766,6 +2819,13 @@ ALTER TABLE ONLY bank_transactions ALTER COLUMN id SET DEFAULT nextval('bank_tra
|
||||||
ALTER TABLE ONLY banklink_transactions ALTER COLUMN id SET DEFAULT nextval('banklink_transactions_id_seq'::regclass);
|
ALTER TABLE ONLY banklink_transactions ALTER COLUMN id SET DEFAULT nextval('banklink_transactions_id_seq'::regclass);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE ONLY blocked_domains ALTER COLUMN id SET DEFAULT nextval('blocked_domains_id_seq'::regclass);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
|
@ -2920,6 +2980,13 @@ ALTER TABLE ONLY log_bank_statements ALTER COLUMN id SET DEFAULT nextval('log_ba
|
||||||
ALTER TABLE ONLY log_bank_transactions ALTER COLUMN id SET DEFAULT nextval('log_bank_transactions_id_seq'::regclass);
|
ALTER TABLE ONLY log_bank_transactions ALTER COLUMN id SET DEFAULT nextval('log_bank_transactions_id_seq'::regclass);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE ONLY log_blocked_domains ALTER COLUMN id SET DEFAULT nextval('log_blocked_domains_id_seq'::regclass);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
|
@ -3102,13 +3169,6 @@ ALTER TABLE ONLY people ALTER COLUMN id SET DEFAULT nextval('people_id_seq'::reg
|
||||||
ALTER TABLE ONLY pricelists ALTER COLUMN id SET DEFAULT nextval('pricelists_id_seq'::regclass);
|
ALTER TABLE ONLY pricelists ALTER COLUMN id SET DEFAULT nextval('pricelists_id_seq'::regclass);
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: job_id; Type: DEFAULT; Schema: public; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
ALTER TABLE ONLY que_jobs ALTER COLUMN job_id SET DEFAULT nextval('que_jobs_job_id_seq'::regclass);
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
|
@ -3228,6 +3288,14 @@ ALTER TABLE ONLY banklink_transactions
|
||||||
ADD CONSTRAINT banklink_transactions_pkey PRIMARY KEY (id);
|
ADD CONSTRAINT banklink_transactions_pkey PRIMARY KEY (id);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: blocked_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE ONLY blocked_domains
|
||||||
|
ADD CONSTRAINT blocked_domains_pkey PRIMARY KEY (id);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
-- Name: certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||||
--
|
--
|
||||||
|
@ -3404,6 +3472,14 @@ ALTER TABLE ONLY log_bank_transactions
|
||||||
ADD CONSTRAINT log_bank_transactions_pkey PRIMARY KEY (id);
|
ADD CONSTRAINT log_bank_transactions_pkey PRIMARY KEY (id);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: log_blocked_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE ONLY log_blocked_domains
|
||||||
|
ADD CONSTRAINT log_blocked_domains_pkey PRIMARY KEY (id);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: log_certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
-- Name: log_certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||||
--
|
--
|
||||||
|
@ -3612,14 +3688,6 @@ ALTER TABLE ONLY pricelists
|
||||||
ADD CONSTRAINT pricelists_pkey PRIMARY KEY (id);
|
ADD CONSTRAINT pricelists_pkey PRIMARY KEY (id);
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: que_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
|
||||||
--
|
|
||||||
|
|
||||||
ALTER TABLE ONLY que_jobs
|
|
||||||
ADD CONSTRAINT que_jobs_pkey PRIMARY KEY (queue, priority, run_at, job_id);
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
-- Name: registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||||
--
|
--
|
||||||
|
@ -4014,6 +4082,20 @@ CREATE INDEX index_log_bank_transactions_on_item_type_and_item_id ON log_bank_tr
|
||||||
CREATE INDEX index_log_bank_transactions_on_whodunnit ON log_bank_transactions USING btree (whodunnit);
|
CREATE INDEX index_log_bank_transactions_on_whodunnit ON log_bank_transactions USING btree (whodunnit);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 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 log_blocked_domains USING btree (item_type, item_id);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: index_log_blocked_domains_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE INDEX index_log_blocked_domains_on_whodunnit ON 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:
|
||||||
--
|
--
|
||||||
|
@ -4378,6 +4460,13 @@ CREATE INDEX index_whois_records_on_domain_id ON whois_records USING btree (doma
|
||||||
CREATE INDEX index_whois_records_on_registrar_id ON whois_records USING btree (registrar_id);
|
CREATE INDEX index_whois_records_on_registrar_id ON whois_records USING btree (registrar_id);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: unique_data_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE UNIQUE INDEX unique_data_migrations ON data_migrations USING btree (version);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
-- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||||
--
|
--
|
||||||
|
@ -4593,8 +4682,6 @@ INSERT INTO schema_migrations (version) VALUES ('20150227092508');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150227113121');
|
INSERT INTO schema_migrations (version) VALUES ('20150227113121');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150302130224');
|
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150302161712');
|
INSERT INTO schema_migrations (version) VALUES ('20150302161712');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150303130729');
|
INSERT INTO schema_migrations (version) VALUES ('20150303130729');
|
||||||
|
@ -4653,8 +4740,6 @@ INSERT INTO schema_migrations (version) VALUES ('20150417082723');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150421134820');
|
INSERT INTO schema_migrations (version) VALUES ('20150421134820');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150422090645');
|
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150422092514');
|
INSERT INTO schema_migrations (version) VALUES ('20150422092514');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150422132631');
|
INSERT INTO schema_migrations (version) VALUES ('20150422132631');
|
||||||
|
@ -4699,8 +4784,6 @@ INSERT INTO schema_migrations (version) VALUES ('20150519115050');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150519140853');
|
INSERT INTO schema_migrations (version) VALUES ('20150519140853');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150519142542');
|
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150519144118');
|
INSERT INTO schema_migrations (version) VALUES ('20150519144118');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150520163237');
|
INSERT INTO schema_migrations (version) VALUES ('20150520163237');
|
||||||
|
@ -4713,7 +4796,9 @@ INSERT INTO schema_migrations (version) VALUES ('20150522164020');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150525075550');
|
INSERT INTO schema_migrations (version) VALUES ('20150525075550');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150603141054');
|
INSERT INTO schema_migrations (version) VALUES ('20150601083516');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20150601083800');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150603141549');
|
INSERT INTO schema_migrations (version) VALUES ('20150603141549');
|
||||||
|
|
||||||
|
@ -4721,8 +4806,12 @@ INSERT INTO schema_migrations (version) VALUES ('20150603211318');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150603212659');
|
INSERT INTO schema_migrations (version) VALUES ('20150603212659');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20150609093515');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150609103333');
|
INSERT INTO schema_migrations (version) VALUES ('20150609103333');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20150610111019');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150610112238');
|
INSERT INTO schema_migrations (version) VALUES ('20150610112238');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150610144547');
|
INSERT INTO schema_migrations (version) VALUES ('20150610144547');
|
||||||
|
@ -4731,3 +4820,7 @@ INSERT INTO schema_migrations (version) VALUES ('20150611124920');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20150612123111');
|
INSERT INTO schema_migrations (version) VALUES ('20150612123111');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20150612125720');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20150701074344');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue