Add entity for reserved list (#381)

This PR added the Cloud SQL entity for reserved list.
This commit is contained in:
Shicong Huang 2019-11-26 16:51:41 -05:00 committed by GitHub
parent 28499d23a0
commit 9be5091c84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 340 additions and 0 deletions

View file

@ -152,6 +152,22 @@
primary key (revision_id)
);
create table "ReservedEntry" (
revision_id int8 not null,
comment text,
reservation_type int4 not null,
domain_label text not null,
primary key (revision_id, domain_label)
);
create table "ReservedList" (
revision_id bigserial not null,
creation_timestamp timestamptz not null,
name text not null,
should_publish boolean not null,
primary key (revision_id)
);
alter table if exists "Domain_DelegationSignerData"
add constraint UK_2yp55erx1i51pa7gnb8bu7tjn unique (ds_data_key_tag);
@ -166,6 +182,7 @@ create index idx_registry_lock_registrar_id on "RegistryLock" (registrar_id);
alter table if exists "RegistryLock"
add constraint idx_registry_lock_repo_id_revision_id unique (repo_id, revision_id);
create index reservedlist_name_idx on "ReservedList" (name);
alter table if exists "ClaimsEntry"
add constraint FK6sc6at5hedffc0nhdcab6ivuq
@ -221,3 +238,8 @@ create index idx_registry_lock_registrar_id on "RegistryLock" (registrar_id);
add constraint FKo0gw90lpo1tuee56l0nb6y6g5
foreign key (revision_id)
references "PremiumList";
alter table if exists "ReservedEntry"
add constraint FKgq03rk0bt1hb915dnyvd3vnfc
foreign key (revision_id)
references "ReservedList";