mirror of
https://github.com/google/nomulus.git
synced 2025-07-25 03:58:34 +02:00
Migrate Registry objects to a TLD table in Cloud SQL (#803)
* Add TLD table * Change reservedLists to array * Change ReservedLists back to a set * Rename reservedListKeyConverter to ReservedListKeySetConverter * Add a postload method
This commit is contained in:
parent
b6ed1982c3
commit
5b78844a94
10 changed files with 335 additions and 105 deletions
53
db/src/main/resources/sql/flyway/V54__add_tld_table.sql
Normal file
53
db/src/main/resources/sql/flyway/V54__add_tld_table.sql
Normal file
|
@ -0,0 +1,53 @@
|
|||
-- Copyright 2020 The Nomulus Authors. All Rights Reserved.
|
||||
--
|
||||
-- Licensed under the Apache License, Version 2.0 (the "License");
|
||||
-- you may not use this file except in compliance with the License.
|
||||
-- You may obtain a copy of the License at
|
||||
--
|
||||
-- http://www.apache.org/licenses/LICENSE-2.0
|
||||
--
|
||||
-- Unless required by applicable law or agreed to in writing, software
|
||||
-- distributed under the License is distributed on an "AS IS" BASIS,
|
||||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
-- See the License for the specific language governing permissions and
|
||||
-- limitations under the License.
|
||||
|
||||
create table "Tld" (
|
||||
tld_name text not null,
|
||||
add_grace_period_length interval not null,
|
||||
allowed_fully_qualified_host_names text[],
|
||||
allowed_registrant_contact_ids text[],
|
||||
anchor_tenant_add_grace_period_length interval not null,
|
||||
auto_renew_grace_period_length interval not null,
|
||||
automatic_transfer_length interval not null,
|
||||
claims_period_end timestamptz not null,
|
||||
create_billing_cost_amount numeric(19, 2),
|
||||
create_billing_cost_currency text,
|
||||
creation_time timestamptz not null,
|
||||
currency text not null,
|
||||
dns_paused boolean not null,
|
||||
dns_writers text[] not null,
|
||||
drive_folder_id text,
|
||||
eap_fee_schedule hstore not null,
|
||||
escrow_enabled boolean not null,
|
||||
invoicing_enabled boolean not null,
|
||||
lordn_username text,
|
||||
num_dns_publish_locks int4 not null,
|
||||
pending_delete_length interval not null,
|
||||
premium_list_name text,
|
||||
pricing_engine_class_name text,
|
||||
redemption_grace_period_length interval not null,
|
||||
renew_billing_cost_transitions hstore not null,
|
||||
renew_grace_period_length interval not null,
|
||||
reserved_list_names text[] not null,
|
||||
restore_billing_cost_amount numeric(19, 2),
|
||||
restore_billing_cost_currency text,
|
||||
roid_suffix text,
|
||||
server_status_change_billing_cost_amount numeric(19, 2),
|
||||
server_status_change_billing_cost_currency text,
|
||||
tld_state_transitions hstore not null,
|
||||
tld_type text not null,
|
||||
tld_unicode text not null,
|
||||
transfer_grace_period_length interval not null,
|
||||
primary key (tld_name)
|
||||
);
|
|
@ -580,6 +580,46 @@ create sequence temp_history_id_sequence start 1 increment 50;
|
|||
primary key (id)
|
||||
);
|
||||
|
||||
create table "Tld" (
|
||||
tld_name text not null,
|
||||
add_grace_period_length interval not null,
|
||||
allowed_fully_qualified_host_names text[],
|
||||
allowed_registrant_contact_ids text[],
|
||||
anchor_tenant_add_grace_period_length interval not null,
|
||||
auto_renew_grace_period_length interval not null,
|
||||
automatic_transfer_length interval not null,
|
||||
claims_period_end timestamptz not null,
|
||||
create_billing_cost_amount numeric(19, 2),
|
||||
create_billing_cost_currency text,
|
||||
creation_time timestamptz not null,
|
||||
currency text not null,
|
||||
dns_paused boolean not null,
|
||||
dns_writers text[] not null,
|
||||
drive_folder_id text,
|
||||
eap_fee_schedule hstore not null,
|
||||
escrow_enabled boolean not null,
|
||||
invoicing_enabled boolean not null,
|
||||
lordn_username text,
|
||||
num_dns_publish_locks int4 not null,
|
||||
pending_delete_length interval not null,
|
||||
premium_list_name text,
|
||||
pricing_engine_class_name text,
|
||||
redemption_grace_period_length interval not null,
|
||||
renew_billing_cost_transitions hstore not null,
|
||||
renew_grace_period_length interval not null,
|
||||
reserved_list_names text[] not null,
|
||||
restore_billing_cost_amount numeric(19, 2),
|
||||
restore_billing_cost_currency text,
|
||||
roid_suffix text,
|
||||
server_status_change_billing_cost_amount numeric(19, 2),
|
||||
server_status_change_billing_cost_currency text,
|
||||
tld_state_transitions hstore not null,
|
||||
tld_type text not null,
|
||||
tld_unicode text not null,
|
||||
transfer_grace_period_length interval not null,
|
||||
primary key (tld_name)
|
||||
);
|
||||
|
||||
create table "Transaction" (
|
||||
id bigserial not null,
|
||||
contents bytea,
|
||||
|
|
|
@ -889,6 +889,50 @@ CREATE SEQUENCE public."SafeBrowsingThreat_id_seq"
|
|||
ALTER SEQUENCE public."SafeBrowsingThreat_id_seq" OWNED BY public."Spec11ThreatMatch".id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: Tld; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public."Tld" (
|
||||
tld_name text NOT NULL,
|
||||
add_grace_period_length interval NOT NULL,
|
||||
allowed_fully_qualified_host_names text[],
|
||||
allowed_registrant_contact_ids text[],
|
||||
anchor_tenant_add_grace_period_length interval NOT NULL,
|
||||
auto_renew_grace_period_length interval NOT NULL,
|
||||
automatic_transfer_length interval NOT NULL,
|
||||
claims_period_end timestamp with time zone NOT NULL,
|
||||
create_billing_cost_amount numeric(19,2),
|
||||
create_billing_cost_currency text,
|
||||
creation_time timestamp with time zone NOT NULL,
|
||||
currency text NOT NULL,
|
||||
dns_paused boolean NOT NULL,
|
||||
dns_writers text[] NOT NULL,
|
||||
drive_folder_id text,
|
||||
eap_fee_schedule public.hstore NOT NULL,
|
||||
escrow_enabled boolean NOT NULL,
|
||||
invoicing_enabled boolean NOT NULL,
|
||||
lordn_username text,
|
||||
num_dns_publish_locks integer NOT NULL,
|
||||
pending_delete_length interval NOT NULL,
|
||||
premium_list_name text,
|
||||
pricing_engine_class_name text,
|
||||
redemption_grace_period_length interval NOT NULL,
|
||||
renew_billing_cost_transitions public.hstore NOT NULL,
|
||||
renew_grace_period_length interval NOT NULL,
|
||||
reserved_list_names text[] NOT NULL,
|
||||
restore_billing_cost_amount numeric(19,2),
|
||||
restore_billing_cost_currency text,
|
||||
roid_suffix text,
|
||||
server_status_change_billing_cost_amount numeric(19,2),
|
||||
server_status_change_billing_cost_currency text,
|
||||
tld_state_transitions public.hstore NOT NULL,
|
||||
tld_type text NOT NULL,
|
||||
tld_unicode text NOT NULL,
|
||||
transfer_grace_period_length interval NOT NULL
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: Transaction; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
@ -1211,6 +1255,14 @@ ALTER TABLE ONLY public."Spec11ThreatMatch"
|
|||
ADD CONSTRAINT "SafeBrowsingThreat_pkey" PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: Tld Tld_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."Tld"
|
||||
ADD CONSTRAINT "Tld_pkey" PRIMARY KEY (tld_name);
|
||||
|
||||
|
||||
--
|
||||
-- Name: Transaction Transaction_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue