Update DB structure

#267
This commit is contained in:
Artur Beljajev 2016-12-27 21:50:59 +02:00
parent e5519e486a
commit 3c4cba93f4
3 changed files with 269 additions and 45 deletions

View file

@ -0,0 +1,128 @@
class UpdateGenerateZoneFileFunction < ActiveRecord::Migration
def up
execute <<-SQL
CREATE OR REPLACE FUNCTION generate_zonefile(i_origin character varying) RETURNS text
LANGUAGE plpgsql
AS $_$
DECLARE
zone_header text := concat('$ORIGIN ', i_origin, '.');
serial_num varchar;
include_filter varchar := '';
exclude_filter varchar := '';
tmp_var text;
ret text;
BEGIN
-- define filters
include_filter = '%.' || i_origin;
-- for %.%.%
IF i_origin ~ '\.' THEN
exclude_filter := '';
-- for %.%
ELSE
exclude_filter := '%.%.' || i_origin;
END IF;
SELECT ROUND(extract(epoch from now() at time zone 'utc')) INTO serial_num;
-- zonefile header
SELECT concat(
format('%-10s', '$ORIGIN .'), chr(10),
format('%-10s', '$TTL'), zf.ttl, chr(10), chr(10),
format('%-10s', i_origin || '.'), 'IN SOA ', zf.master_nameserver, '. ', zf.email, '. (', chr(10),
format('%-17s', ''), format('%-12s', serial_num), '; serial number', chr(10),
format('%-17s', ''), format('%-12s', zf.refresh), '; refresh, seconds', chr(10),
format('%-17s', ''), format('%-12s', zf.retry), '; retry, seconds', chr(10),
format('%-17s', ''), format('%-12s', zf.expire), '; expire, seconds', chr(10),
format('%-17s', ''), format('%-12s', zf.minimum_ttl), '; minimum TTL, seconds', chr(10),
format('%-17s', ''), ')'
) FROM zonefile_settings zf WHERE i_origin = zf.origin INTO tmp_var;
ret = concat(tmp_var, chr(10), chr(10));
-- origin ns records
SELECT ns_records FROM zonefile_settings zf WHERE i_origin = zf.origin INTO tmp_var;
ret := concat(ret, '; Zone NS Records', chr(10), tmp_var, chr(10));
-- ns records
SELECT array_to_string(
array(
SELECT concat(d.name_puny, '. IN NS ', ns.hostname, '.')
FROM domains d
JOIN nameservers ns ON ns.domain_id = d.id
WHERE d.name LIKE include_filter AND d.name NOT LIKE exclude_filter
AND NOT ('{serverHold,clientHold,inactive}' && d.statuses)
ORDER BY d.name
),
chr(10)
) INTO tmp_var;
ret := concat(ret, tmp_var, chr(10), chr(10));
-- origin a glue records
SELECT a_records FROM zonefile_settings zf WHERE i_origin = zf.origin INTO tmp_var;
ret := concat(ret, '; Zone A Records', chr(10), tmp_var, chr(10));
-- a glue records for other nameservers
SELECT array_to_string(
array(
SELECT concat(ns.hostname, '. IN A ', unnest(ns.ipv4))
FROM nameservers ns
JOIN domains d ON d.id = ns.domain_id
WHERE d.name LIKE include_filter AND d.name NOT LIKE exclude_filter
AND ns.hostname LIKE '%.' || d.name
AND d.name <> i_origin
AND ns.ipv4 IS NOT NULL AND ns.ipv4 <> '{}'
AND NOT ('{serverHold,clientHold,inactive}' && d.statuses)
), chr(10)
) INTO tmp_var;
ret := concat(ret, tmp_var, chr(10), chr(10));
-- origin aaaa glue records
SELECT a4_records FROM zonefile_settings zf WHERE i_origin = zf.origin INTO tmp_var;
ret := concat(ret, '; Zone AAAA Records', chr(10), tmp_var, chr(10));
-- aaaa glue records for other nameservers
SELECT array_to_string(
array(
SELECT concat(ns.hostname, '. IN AAAA ', unnest(ns.ipv6))
FROM nameservers ns
JOIN domains d ON d.id = ns.domain_id
WHERE d.name LIKE include_filter AND d.name NOT LIKE exclude_filter
AND ns.hostname LIKE '%.' || d.name
AND d.name <> i_origin
AND ns.ipv6 IS NOT NULL AND ns.ipv6 <> '{}'
AND NOT ('{serverHold,clientHold,inactive}' && d.statuses)
), chr(10)
) INTO tmp_var;
ret := concat(ret, tmp_var, chr(10), chr(10));
-- ds records
SELECT array_to_string(
array(
SELECT concat(
d.name_puny, '. 3600 IN DS ', dk.ds_key_tag, ' ',
dk.ds_alg, ' ', dk.ds_digest_type, ' ', dk.ds_digest
)
FROM domains d
JOIN dnskeys dk ON dk.domain_id = d.id
WHERE d.name LIKE include_filter AND d.name NOT LIKE exclude_filter AND dk.flags = 257
AND NOT ('{serverHold,clientHold,inactive}' && d.statuses)
),
chr(10)
) INTO tmp_var;
ret := concat(ret, '; Zone DS Records', chr(10), tmp_var, chr(10));
RETURN ret;
END;
$_$;
SQL
end
def down
raise ActiveRecord::IrreversibleMigration
end
end

View file

@ -11,12 +11,12 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160304125933) do
ActiveRecord::Schema.define(version: 20161227193500) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
enable_extension "hstore"
enable_extension "btree_gist"
enable_extension "hstore"
create_table "account_activities", force: :cascade do |t|
t.integer "account_id"
@ -214,11 +214,13 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.string "country_code"
t.string "state"
t.integer "legacy_id"
t.string "statuses", array: true
t.string "statuses", default: [], array: true
t.hstore "status_notes"
t.integer "legacy_history_id"
t.integer "copy_from_id"
t.datetime "ident_updated_at"
t.integer "upid"
t.datetime "up_date"
end
add_index "contacts", ["code"], name: "index_contacts_on_code", using: :btree
@ -261,6 +263,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "invoice_number"
t.text "request"
end
add_index "directos", ["item_type", "item_id"], name: "index_directos_on_item_type_and_item_id", using: :btree
@ -360,6 +363,8 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.boolean "reserved", default: false
t.hstore "status_notes"
t.string "statuses_backup", default: [], array: true
t.integer "upid"
t.datetime "up_date"
end
add_index "domains", ["delete_at"], name: "index_domains_on_delete_at", using: :btree
@ -488,6 +493,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_account_activities", ["item_type", "item_id"], name: "index_log_account_activities_on_item_type_and_item_id", using: :btree
@ -503,6 +509,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_accounts", ["item_type", "item_id"], name: "index_log_accounts_on_item_type_and_item_id", using: :btree
@ -518,6 +525,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_addresses", ["item_type", "item_id"], name: "index_log_addresses_on_item_type_and_item_id", using: :btree
@ -533,6 +541,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_api_users", ["item_type", "item_id"], name: "index_log_api_users_on_item_type_and_item_id", using: :btree
@ -548,6 +557,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_bank_statements", ["item_type", "item_id"], name: "index_log_bank_statements_on_item_type_and_item_id", using: :btree
@ -563,6 +573,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_bank_transactions", ["item_type", "item_id"], name: "index_log_bank_transactions_on_item_type_and_item_id", using: :btree
@ -578,6 +589,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_blocked_domains", ["item_type", "item_id"], name: "index_log_blocked_domains_on_item_type_and_item_id", using: :btree
@ -593,6 +605,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_certificates", ["item_type", "item_id"], name: "index_log_certificates_on_item_type_and_item_id", using: :btree
@ -608,6 +621,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_contact_statuses", ["item_type", "item_id"], name: "index_log_contact_statuses_on_item_type_and_item_id", using: :btree
@ -624,6 +638,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.string "session"
t.json "children"
t.datetime "ident_updated_at"
t.string "uuid"
end
add_index "log_contacts", ["item_type", "item_id"], name: "index_log_contacts_on_item_type_and_item_id", using: :btree
@ -639,6 +654,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_countries", ["item_type", "item_id"], name: "index_log_countries_on_item_type_and_item_id", using: :btree
@ -654,6 +670,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_dnskeys", ["item_type", "item_id"], name: "index_log_dnskeys_on_item_type_and_item_id", using: :btree
@ -669,6 +686,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_domain_contacts", ["item_type", "item_id"], name: "index_log_domain_contacts_on_item_type_and_item_id", using: :btree
@ -684,6 +702,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_domain_statuses", ["item_type", "item_id"], name: "index_log_domain_statuses_on_item_type_and_item_id", using: :btree
@ -699,6 +718,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_domain_transfers", ["item_type", "item_id"], name: "index_log_domain_transfers_on_item_type_and_item_id", using: :btree
@ -717,6 +737,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.text "admin_contact_ids", default: [], array: true
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_domains", ["item_type", "item_id"], name: "index_log_domains_on_item_type_and_item_id", using: :btree
@ -732,6 +753,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_invoice_items", ["item_type", "item_id"], name: "index_log_invoice_items_on_item_type_and_item_id", using: :btree
@ -747,6 +769,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_invoices", ["item_type", "item_id"], name: "index_log_invoices_on_item_type_and_item_id", using: :btree
@ -762,6 +785,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_keyrelays", ["item_type", "item_id"], name: "index_log_keyrelays_on_item_type_and_item_id", using: :btree
@ -777,6 +801,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_messages", ["item_type", "item_id"], name: "index_log_messages_on_item_type_and_item_id", using: :btree
@ -792,6 +817,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_nameservers", ["item_type", "item_id"], name: "index_log_nameservers_on_item_type_and_item_id", using: :btree
@ -806,6 +832,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.json "object_changes"
t.datetime "created_at"
t.string "session"
t.string "uuid"
end
create_table "log_registrars", force: :cascade do |t|
@ -818,6 +845,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_registrars", ["item_type", "item_id"], name: "index_log_registrars_on_item_type_and_item_id", using: :btree
@ -833,6 +861,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_reserved_domains", ["item_type", "item_id"], name: "index_log_reserved_domains_on_item_type_and_item_id", using: :btree
@ -848,6 +877,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_settings", ["item_type", "item_id"], name: "index_log_settings_on_item_type_and_item_id", using: :btree
@ -863,6 +893,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_users", ["item_type", "item_id"], name: "index_log_users_on_item_type_and_item_id", using: :btree
@ -878,6 +909,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
create_table "log_zonefile_settings", force: :cascade do |t|
@ -890,6 +922,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.datetime "created_at"
t.string "session"
t.json "children"
t.string "uuid"
end
add_index "log_zonefile_settings", ["item_type", "item_id"], name: "index_log_zonefile_settings_on_item_type_and_item_id", using: :btree
@ -931,6 +964,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.string "creator_str"
t.string "updator_str"
t.integer "legacy_domain_id"
t.string "hostname_puny"
end
add_index "nameservers", ["domain_id"], name: "index_nameservers_on_domain_id", using: :btree
@ -1015,6 +1049,7 @@ ActiveRecord::Schema.define(version: 20160304125933) do
t.boolean "vat"
t.integer "legacy_id"
t.string "reference_no"
t.boolean "test_registrar", default: false
end
add_index "registrars", ["code"], name: "index_registrars_on_code", using: :btree

View file

@ -167,12 +167,12 @@ CREATE FUNCTION generate_zonefile(i_origin character varying) RETURNS text
exclude_filter varchar := '';
tmp_var text;
ret text;
BEGIN
BEGIN
-- define filters
include_filter = '%.' || i_origin;
-- for %.%.%
IF i_origin ~ '\.' THEN
IF i_origin ~ '.' THEN
exclude_filter := '';
-- for %.%
ELSE
@ -207,7 +207,7 @@ CREATE FUNCTION generate_zonefile(i_origin character varying) RETURNS text
FROM domains d
JOIN nameservers ns ON ns.domain_id = d.id
WHERE d.name LIKE include_filter AND d.name NOT LIKE exclude_filter
AND NOT ('{serverHold,clientHold}' && d.statuses)
AND NOT ('{serverHold,clientHold,inactive}' && d.statuses)
ORDER BY d.name
),
chr(10)
@ -222,14 +222,14 @@ CREATE FUNCTION generate_zonefile(i_origin character varying) RETURNS text
-- a glue records for other nameservers
SELECT array_to_string(
array(
SELECT concat(ns.hostname, '. IN A ', ns.ipv4)
SELECT concat(ns.hostname, '. IN A ', unnest(ns.ipv4))
FROM nameservers ns
JOIN domains d ON d.id = ns.domain_id
WHERE d.name LIKE include_filter AND d.name NOT LIKE exclude_filter
AND ns.hostname LIKE '%.' || d.name
AND d.name <> i_origin
AND ns.ipv4 IS NOT NULL AND ns.ipv4 <> '{}'
AND NOT ('{serverHold,clientHold}' && d.statuses)
AND NOT ('{serverHold,clientHold,inactive}' && d.statuses)
), chr(10)
) INTO tmp_var;
@ -242,14 +242,14 @@ CREATE FUNCTION generate_zonefile(i_origin character varying) RETURNS text
-- aaaa glue records for other nameservers
SELECT array_to_string(
array(
SELECT concat(ns.hostname, '. IN AAAA ', ns.ipv6)
SELECT concat(ns.hostname, '. IN AAAA ', unnest(ns.ipv6))
FROM nameservers ns
JOIN domains d ON d.id = ns.domain_id
WHERE d.name LIKE include_filter AND d.name NOT LIKE exclude_filter
AND ns.hostname LIKE '%.' || d.name
AND d.name <> i_origin
AND ns.ipv6 IS NOT NULL AND ns.ipv6 <> '{}'
AND NOT ('{serverHold,clientHold}' && d.statuses)
AND NOT ('{serverHold,clientHold,inactive}' && d.statuses)
), chr(10)
) INTO tmp_var;
@ -265,7 +265,7 @@ CREATE FUNCTION generate_zonefile(i_origin character varying) RETURNS text
FROM domains d
JOIN dnskeys dk ON dk.domain_id = d.id
WHERE d.name LIKE include_filter AND d.name NOT LIKE exclude_filter AND dk.flags = 257
AND NOT ('{serverHold,clientHold}' && d.statuses)
AND NOT ('{serverHold,clientHold,inactive}' && d.statuses)
),
chr(10)
) INTO tmp_var;
@ -744,11 +744,13 @@ CREATE TABLE contacts (
country_code character varying,
state character varying,
legacy_id integer,
statuses character varying[],
statuses character varying[] DEFAULT '{}'::character varying[],
status_notes hstore,
legacy_history_id integer,
copy_from_id integer,
ident_updated_at timestamp without time zone
ident_updated_at timestamp without time zone,
upid integer,
up_date timestamp without time zone
);
@ -887,7 +889,8 @@ CREATE TABLE directos (
response json,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
invoice_number character varying
invoice_number character varying,
request text
);
@ -1098,7 +1101,9 @@ CREATE TABLE domains (
statuses character varying[],
reserved boolean DEFAULT false,
status_notes hstore,
statuses_backup character varying[] DEFAULT '{}'::character varying[]
statuses_backup character varying[] DEFAULT '{}'::character varying[],
upid integer,
up_date timestamp without time zone
);
@ -1353,7 +1358,8 @@ CREATE TABLE log_account_activities (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -1390,7 +1396,8 @@ CREATE TABLE log_accounts (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -1427,7 +1434,8 @@ CREATE TABLE log_addresses (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -1464,7 +1472,8 @@ CREATE TABLE log_api_users (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -1501,7 +1510,8 @@ CREATE TABLE log_bank_statements (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -1538,7 +1548,8 @@ CREATE TABLE log_bank_transactions (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -1575,7 +1586,8 @@ CREATE TABLE log_blocked_domains (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -1612,7 +1624,8 @@ CREATE TABLE log_certificates (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -1649,7 +1662,8 @@ CREATE TABLE log_contact_statuses (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -1687,7 +1701,8 @@ CREATE TABLE log_contacts (
created_at timestamp without time zone,
session character varying,
children json,
ident_updated_at timestamp without time zone
ident_updated_at timestamp without time zone,
uuid character varying
);
@ -1724,7 +1739,8 @@ CREATE TABLE log_countries (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -1761,7 +1777,8 @@ CREATE TABLE log_dnskeys (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -1798,7 +1815,8 @@ CREATE TABLE log_domain_contacts (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -1835,7 +1853,8 @@ CREATE TABLE log_domain_statuses (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -1872,7 +1891,8 @@ CREATE TABLE log_domain_transfers (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -1912,7 +1932,8 @@ CREATE TABLE log_domains (
tech_contact_ids text[] DEFAULT '{}'::text[],
admin_contact_ids text[] DEFAULT '{}'::text[],
session character varying,
children json
children json,
uuid character varying
);
@ -1949,7 +1970,8 @@ CREATE TABLE log_invoice_items (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -1986,7 +2008,8 @@ CREATE TABLE log_invoices (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -2023,7 +2046,8 @@ CREATE TABLE log_keyrelays (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -2060,7 +2084,8 @@ CREATE TABLE log_messages (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -2097,7 +2122,8 @@ CREATE TABLE log_nameservers (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -2133,7 +2159,8 @@ CREATE TABLE log_pricelists (
object json,
object_changes json,
created_at timestamp without time zone,
session character varying
session character varying,
uuid character varying
);
@ -2170,7 +2197,8 @@ CREATE TABLE log_registrars (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -2207,7 +2235,8 @@ CREATE TABLE log_reserved_domains (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -2244,7 +2273,8 @@ CREATE TABLE log_settings (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -2281,7 +2311,8 @@ CREATE TABLE log_users (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -2318,7 +2349,8 @@ CREATE TABLE log_white_ips (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -2355,7 +2387,8 @@ CREATE TABLE log_zonefile_settings (
object_changes json,
created_at timestamp without time zone,
session character varying,
children json
children json,
uuid character varying
);
@ -2466,7 +2499,8 @@ CREATE TABLE nameservers (
domain_id integer,
creator_str character varying,
updator_str character varying,
legacy_domain_id integer
legacy_domain_id integer,
hostname_puny character varying
);
@ -2673,7 +2707,8 @@ CREATE TABLE registrars (
directo_handle character varying,
vat boolean,
legacy_id integer,
reference_no character varying
reference_no character varying,
test_registrar boolean DEFAULT false
);
@ -5214,5 +5249,31 @@ INSERT INTO schema_migrations (version) VALUES ('20160118092454');
INSERT INTO schema_migrations (version) VALUES ('20160218102355');
INSERT INTO schema_migrations (version) VALUES ('20160225113801');
INSERT INTO schema_migrations (version) VALUES ('20160225113812');
INSERT INTO schema_migrations (version) VALUES ('20160226132045');
INSERT INTO schema_migrations (version) VALUES ('20160226132056');
INSERT INTO schema_migrations (version) VALUES ('20160304125933');
INSERT INTO schema_migrations (version) VALUES ('20160311085957');
INSERT INTO schema_migrations (version) VALUES ('20160405131315');
INSERT INTO schema_migrations (version) VALUES ('20160411140719');
INSERT INTO schema_migrations (version) VALUES ('20160414110443');
INSERT INTO schema_migrations (version) VALUES ('20160421074023');
INSERT INTO schema_migrations (version) VALUES ('20160429114732');
INSERT INTO schema_migrations (version) VALUES ('20160527110738');
INSERT INTO schema_migrations (version) VALUES ('20161004101419');
INSERT INTO schema_migrations (version) VALUES ('20161227193500');