mirror of
https://github.com/google/nomulus.git
synced 2025-05-27 22:50:08 +02:00
Add JPA annotations to class Registrar (#430)
* Add JPA annotations to class Registrar * Use array for Java list * Exclude parent field * Use 3 columns for address and use text for enum * Use EnumParameter and 3 properties in Address * Rename columns and rebase on HEAD
This commit is contained in:
parent
e386bf5bd8
commit
d03cea2443
23 changed files with 827 additions and 46 deletions
65
db/src/main/resources/sql/flyway/V16__create_registrar.sql
Normal file
65
db/src/main/resources/sql/flyway/V16__create_registrar.sql
Normal file
|
@ -0,0 +1,65 @@
|
|||
-- 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 "Registrar" (
|
||||
client_id text not null,
|
||||
allowed_tlds text[],
|
||||
billing_account_map hstore,
|
||||
billing_identifier int8,
|
||||
block_premium_names boolean not null,
|
||||
client_certificate text,
|
||||
client_certificate_hash text,
|
||||
contacts_require_syncing boolean not null,
|
||||
creation_time timestamptz,
|
||||
drive_folder_id text,
|
||||
email_address text,
|
||||
failover_client_certificate text,
|
||||
failover_client_certificate_hash text,
|
||||
fax_number text,
|
||||
iana_identifier int8,
|
||||
icann_referral_email text,
|
||||
i18n_address_city text,
|
||||
i18n_address_country_code text,
|
||||
i18n_address_state text,
|
||||
i18n_address_street_line1 text,
|
||||
i18n_address_street_line2 text,
|
||||
i18n_address_street_line3 text,
|
||||
i18n_address_zip text,
|
||||
ip_address_whitelist text[],
|
||||
last_certificate_update_time timestamptz,
|
||||
last_update_time timestamptz,
|
||||
localized_address_city text,
|
||||
localized_address_country_code text,
|
||||
localized_address_state text,
|
||||
localized_address_street_line1 text,
|
||||
localized_address_street_line2 text,
|
||||
localized_address_street_line3 text,
|
||||
localized_address_zip text,
|
||||
password_hash text,
|
||||
phone_number text,
|
||||
phone_passcode text,
|
||||
po_number text,
|
||||
rdap_base_urls text[],
|
||||
registrar_name text not null,
|
||||
registry_lock_allowed boolean not null,
|
||||
password_salt text,
|
||||
state text,
|
||||
type text not null,
|
||||
url text,
|
||||
whois_server text,
|
||||
primary key (client_id)
|
||||
);
|
||||
|
||||
create index registrar_name_idx on "Registrar" (registrar_name);
|
||||
create index registrar_iana_identifier_idx on "Registrar" (iana_identifier);
|
|
@ -93,6 +93,55 @@
|
|||
primary key (revision_id)
|
||||
);
|
||||
|
||||
create table "Registrar" (
|
||||
client_id text not null,
|
||||
allowed_tlds text[],
|
||||
billing_account_map hstore,
|
||||
billing_identifier int8,
|
||||
block_premium_names boolean not null,
|
||||
client_certificate text,
|
||||
client_certificate_hash text,
|
||||
contacts_require_syncing boolean not null,
|
||||
creation_time timestamptz,
|
||||
drive_folder_id text,
|
||||
email_address text,
|
||||
failover_client_certificate text,
|
||||
failover_client_certificate_hash text,
|
||||
fax_number text,
|
||||
iana_identifier int8,
|
||||
icann_referral_email text,
|
||||
i18n_address_city text,
|
||||
i18n_address_country_code text,
|
||||
i18n_address_state text,
|
||||
i18n_address_street_line1 text,
|
||||
i18n_address_street_line2 text,
|
||||
i18n_address_street_line3 text,
|
||||
i18n_address_zip text,
|
||||
ip_address_whitelist text[],
|
||||
last_certificate_update_time timestamptz,
|
||||
last_update_time timestamptz,
|
||||
localized_address_city text,
|
||||
localized_address_country_code text,
|
||||
localized_address_state text,
|
||||
localized_address_street_line1 text,
|
||||
localized_address_street_line2 text,
|
||||
localized_address_street_line3 text,
|
||||
localized_address_zip text,
|
||||
password_hash text,
|
||||
phone_number text,
|
||||
phone_passcode text,
|
||||
po_number text,
|
||||
rdap_base_urls text[],
|
||||
registrar_name text not null,
|
||||
registry_lock_allowed boolean not null,
|
||||
password_salt text,
|
||||
state text,
|
||||
type text not null,
|
||||
url text,
|
||||
whois_server text,
|
||||
primary key (client_id)
|
||||
);
|
||||
|
||||
create table "RegistryLock" (
|
||||
revision_id bigserial not null,
|
||||
domain_name text not null,
|
||||
|
@ -130,6 +179,8 @@ create index IDX5mnf0wn20tno4b9do88j61klr on "Domain" (deletion_time);
|
|||
create index IDX1rcgkdd777bpvj0r94sltwd5y on "Domain" (fully_qualified_domain_name);
|
||||
create index IDXrwl38wwkli1j7gkvtywi9jokq on "Domain" (tld);
|
||||
create index premiumlist_name_idx on "PremiumList" (name);
|
||||
create index registrar_name_idx on "Registrar" (registrar_name);
|
||||
create index registrar_iana_identifier_idx on "Registrar" (iana_identifier);
|
||||
create index idx_registry_lock_verification_code on "RegistryLock" (verification_code);
|
||||
create index idx_registry_lock_registrar_id on "RegistryLock" (registrar_id);
|
||||
|
||||
|
|
|
@ -159,6 +159,59 @@ CREATE SEQUENCE public."PremiumList_revision_id_seq"
|
|||
ALTER SEQUENCE public."PremiumList_revision_id_seq" OWNED BY public."PremiumList".revision_id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: Registrar; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public."Registrar" (
|
||||
client_id text NOT NULL,
|
||||
allowed_tlds text[],
|
||||
billing_account_map public.hstore,
|
||||
billing_identifier bigint,
|
||||
block_premium_names boolean NOT NULL,
|
||||
client_certificate text,
|
||||
client_certificate_hash text,
|
||||
contacts_require_syncing boolean NOT NULL,
|
||||
creation_time timestamp with time zone,
|
||||
drive_folder_id text,
|
||||
email_address text,
|
||||
failover_client_certificate text,
|
||||
failover_client_certificate_hash text,
|
||||
fax_number text,
|
||||
iana_identifier bigint,
|
||||
icann_referral_email text,
|
||||
i18n_address_city text,
|
||||
i18n_address_country_code text,
|
||||
i18n_address_state text,
|
||||
i18n_address_street_line1 text,
|
||||
i18n_address_street_line2 text,
|
||||
i18n_address_street_line3 text,
|
||||
i18n_address_zip text,
|
||||
ip_address_whitelist text[],
|
||||
last_certificate_update_time timestamp with time zone,
|
||||
last_update_time timestamp with time zone,
|
||||
localized_address_city text,
|
||||
localized_address_country_code text,
|
||||
localized_address_state text,
|
||||
localized_address_street_line1 text,
|
||||
localized_address_street_line2 text,
|
||||
localized_address_street_line3 text,
|
||||
localized_address_zip text,
|
||||
password_hash text,
|
||||
phone_number text,
|
||||
phone_passcode text,
|
||||
po_number text,
|
||||
rdap_base_urls text[],
|
||||
registrar_name text NOT NULL,
|
||||
registry_lock_allowed boolean NOT NULL,
|
||||
password_salt text,
|
||||
state text,
|
||||
type text NOT NULL,
|
||||
url text,
|
||||
whois_server text
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: RegistryLock; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
@ -317,6 +370,14 @@ ALTER TABLE ONLY public."PremiumList"
|
|||
ADD CONSTRAINT "PremiumList_pkey" PRIMARY KEY (revision_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: Registrar Registrar_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."Registrar"
|
||||
ADD CONSTRAINT "Registrar_pkey" PRIMARY KEY (client_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: RegistryLock RegistryLock_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
@ -405,6 +466,20 @@ CREATE INDEX idxrwl38wwkli1j7gkvtywi9jokq ON public."Domain" USING btree (tld);
|
|||
CREATE INDEX premiumlist_name_idx ON public."PremiumList" USING btree (name);
|
||||
|
||||
|
||||
--
|
||||
-- Name: registrar_iana_identifier_idx; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX registrar_iana_identifier_idx ON public."Registrar" USING btree (iana_identifier);
|
||||
|
||||
|
||||
--
|
||||
-- Name: registrar_name_idx; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX registrar_name_idx ON public."Registrar" USING btree (registrar_name);
|
||||
|
||||
|
||||
--
|
||||
-- Name: reservedlist_name_idx; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue