diff --git a/db/src/main/resources/sql/er_diagram/brief_er_diagram.html b/db/src/main/resources/sql/er_diagram/brief_er_diagram.html index dc9fadf47..75111ef7c 100644 --- a/db/src/main/resources/sql/er_diagram/brief_er_diagram.html +++ b/db/src/main/resources/sql/er_diagram/brief_er_diagram.html @@ -261,26 +261,26 @@ td.section { generated on - 2024-05-30 20:54:05.059075326 + 2024-06-05 18:34:54.436578672 last flyway file - V172__allocation_token_renewal_price.sql + V173__create_feature_flag_table.sql

 

 

- - + + SchemaCrawler_Diagram - + generated by SchemaCrawler 16.10.1 generated on - 2024-05-30 20:54:05.059075326 + 2024-06-05 18:34:54.436578672 @@ -487,7 +487,7 @@ td.section { fk_billing_event_cancellation_matching_billing_recurrence_id - + registrar_6e1503e3 @@ -848,7 +848,7 @@ td.section { fk_domain_transfer_losing_registrar_id - + tld_f1fa57e2 @@ -1235,7 +1235,7 @@ td.section { text not null - + user_f2216f01 @@ -1556,7 +1556,7 @@ td.section { fk_poll_message_host_repo_id - + hosthistory_56210c2 @@ -2018,6 +2018,19 @@ td.section { fk7w3cx8d55q8bln80e716tr7b8 + + + + featureflag_3ee43a78 + + + public.FeatureFlag + + [table] + feature_name + + text not null + @@ -2045,107 +2058,107 @@ td.section { <polyline fill="none" stroke="black" points="195.66,-1511.28 199.82,-1514.05 " /> <text text-anchor="start" x="1466.5" y="-1958.3" font-family="Helvetica,sans-Serif" font-size="14.00">fk_history_registrar_id</text> </g> <!-- lock_f21d4861 --> - <g id="node28" class="node"> + <g id="node29" class="node"> <title> lock_f21d4861 - - public.Lock - - [table] - resource_name - - text not null - "scope" - - text not null - + + public.Lock + + [table] + resource_name + + text not null + "scope" + + text not null + - + packagepromotion_56aa33 - - public.PackagePromotion - - [table] - package_promotion_id - - bigserial not null - - auto-incremented - token - - text not null - + + public.PackagePromotion + + [table] + package_promotion_id + + bigserial not null + + auto-incremented + token + + text not null + - + premiumentry_b0060b91 - - public.PremiumEntry - - [table] - revision_id - - int8 not null - domain_label - - text not null - + + public.PremiumEntry + + [table] + revision_id + + int8 not null + domain_label + + text not null + - + premiumlist_7c3ea68b - - public.PremiumList - - [table] - revision_id - - bigserial not null - - auto-incremented - name - - text not null - + + public.PremiumList + + [table] + revision_id + + bigserial not null + + auto-incremented + name + + text not null + premiumentry_b0060b91:w->premiumlist_7c3ea68b:e - - - - - - - - fko0gw90lpo1tuee56l0nb6y6g5 + + + + + + + + fko0gw90lpo1tuee56l0nb6y6g5 - + rderevision_83396864 - - public.RdeRevision - - [table] - tld - - text not null - mode - - text not null - "date" - - date not null - + + public.RdeRevision + + [table] + tld + + text not null + mode + + text not null + "date" + + date not null + - + registrarpoc_ab47054d @@ -2177,7 +2190,7 @@ td.section { fk_registrar_poc_registrar_id - + registrarupdatehistory_8a38bed4 @@ -2222,7 +2235,7 @@ td.section { fksr7w342s7x5s5jvdti2axqeq8 - + registrarpocupdatehistory_31e5d9aa @@ -2283,188 +2296,188 @@ td.section { fkftpbwctxtkc1i0njc0tdcaa2g - + registrylock_ac88663e - - public.RegistryLock - - [table] - revision_id - - bigserial not null - - auto-incremented - registrar_id - - text not null - repo_id - - text not null - verification_code - - text not null - relock_revision_id - - int8 - + + public.RegistryLock + + [table] + revision_id + + bigserial not null + + auto-incremented + registrar_id + + text not null + repo_id + + text not null + verification_code + + text not null + relock_revision_id + + int8 + registrylock_ac88663e:w->registrylock_ac88663e:e - - - - - - - - fk2lhcwpxlnqijr96irylrh1707 + + + + + + + + fk2lhcwpxlnqijr96irylrh1707 - + reservedentry_1a7b8520 - - public.ReservedEntry - - [table] - revision_id - - int8 not null - domain_label - - text not null - + + public.ReservedEntry + + [table] + revision_id + + int8 not null + domain_label + + text not null + - + reservedlist_b97c3f1c - - public.ReservedList - - [table] - revision_id - - bigserial not null - - auto-incremented - name - - text not null - + + public.ReservedList + + [table] + revision_id + + bigserial not null + + auto-incremented + name + + text not null + reservedentry_1a7b8520:w->reservedlist_b97c3f1c:e - - - - - - - - fkgq03rk0bt1hb915dnyvd3vnfc + + + + + + + + fkgq03rk0bt1hb915dnyvd3vnfc - + serversecret_6cc90f09 - - public.ServerSecret - - [table] - id - - int8 not null - + + public.ServerSecret + + [table] + id + + int8 not null + - + signedmarkrevocationentry_99c39721 - - public.SignedMarkRevocationEntry - - [table] - revision_id - - int8 not null - smd_id - - text not null - + + public.SignedMarkRevocationEntry + + [table] + revision_id + + int8 not null + smd_id + + text not null + - + signedmarkrevocationlist_c5d968fb - - public.SignedMarkRevocationList - - [table] - revision_id - - bigserial not null - - auto-incremented - + + public.SignedMarkRevocationList + + [table] + revision_id + + bigserial not null + + auto-incremented + signedmarkrevocationentry_99c39721:w->signedmarkrevocationlist_c5d968fb:e - - - - - - - - fk5ivlhvs3121yx2li5tqh54u4 + + + + + + + + fk5ivlhvs3121yx2li5tqh54u4 - + spec11threatmatch_a61228a6 - - public.Spec11ThreatMatch - - [table] - id - - bigserial not null - - auto-incremented - check_date - - date not null - registrar_id - - text not null - tld - - text not null - + + public.Spec11ThreatMatch + + [table] + id + + bigserial not null + + auto-incremented + check_date + + date not null + registrar_id + + text not null + tld + + text not null + - + tmchcrl_d282355 - - public.TmchCrl - - [table] - id - - int8 not null - + + public.TmchCrl + + [table] + id + + int8 not null + - + userupdatehistory_24efd476 @@ -4840,6 +4853,37 @@ td.section {

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ public.FeatureFlag [table] +
feature_nametext not null
Primary Key
FeatureFlag_pkey[primary key]
feature_name
+

 

- + - +
public.GracePeriod [table] diff --git a/db/src/main/resources/sql/er_diagram/full_er_diagram.html b/db/src/main/resources/sql/er_diagram/full_er_diagram.html index 9cdff6167..c912c19a0 100644 --- a/db/src/main/resources/sql/er_diagram/full_er_diagram.html +++ b/db/src/main/resources/sql/er_diagram/full_er_diagram.html @@ -261,26 +261,26 @@ td.section {
generated on2024-05-30 20:54:02.1854288012024-06-05 18:34:52.170849945
last flyway fileV172__allocation_token_renewal_price.sqlV173__create_feature_flag_table.sql

 

 

- - + + SchemaCrawler_Diagram - + generated by SchemaCrawler 16.10.1 generated on - 2024-05-30 20:54:02.185428801 + 2024-06-05 18:34:52.170849945 @@ -745,7 +745,7 @@ td.section { fk_billing_event_cancellation_matching_billing_recurrence_id - + registrar_6e1503e3 @@ -1487,7 +1487,7 @@ td.section { fk_domain_transfer_losing_registrar_id - + tld_f1fa57e2 @@ -2063,7 +2063,7 @@ td.section { text not null - + user_f2216f01 @@ -2663,7 +2663,7 @@ td.section { fk_poll_message_host_repo_id - + hosthistory_56210c2 @@ -3236,6 +3236,22 @@ td.section { fk7w3cx8d55q8bln80e716tr7b8 + + + + featureflag_3ee43a78 + + + public.FeatureFlag + + [table] + feature_name + + text not null + status + + "hstore" not null + @@ -3263,149 +3279,149 @@ td.section { <polyline fill="none" stroke="black" points="448.27,-5354.11 452.53,-5356.71 " /> <text text-anchor="start" x="1865.5" y="-5846.3" font-family="Helvetica,sans-Serif" font-size="14.00">fk_history_registrar_id</text> </g> <!-- lock_f21d4861 --> - <g id="node28" class="node"> + <g id="node29" class="node"> <title> lock_f21d4861 - - public.Lock - - [table] - resource_name - - text not null - "scope" - - text not null - acquired_time - - timestamptz not null - expiration_time - - timestamptz not null - + + public.Lock + + [table] + resource_name + + text not null + "scope" + + text not null + acquired_time + + timestamptz not null + expiration_time + + timestamptz not null + - + packagepromotion_56aa33 - - public.PackagePromotion - - [table] - package_promotion_id - - bigserial not null - - auto-incremented - last_notification_sent - - timestamptz - max_creates - - int4 not null - max_domains - - int4 not null - next_billing_date - - timestamptz not null - package_price_amount - - numeric(19, 2) not null - package_price_currency - - text not null - token - - text not null - + + public.PackagePromotion + + [table] + package_promotion_id + + bigserial not null + + auto-incremented + last_notification_sent + + timestamptz + max_creates + + int4 not null + max_domains + + int4 not null + next_billing_date + + timestamptz not null + package_price_amount + + numeric(19, 2) not null + package_price_currency + + text not null + token + + text not null + - + premiumentry_b0060b91 - - public.PremiumEntry - - [table] - revision_id - - int8 not null - price - - numeric(19, 2) not null - domain_label - - text not null - + + public.PremiumEntry + + [table] + revision_id + + int8 not null + price + + numeric(19, 2) not null + domain_label + + text not null + - + premiumlist_7c3ea68b - - public.PremiumList - - [table] - revision_id - - bigserial not null - - auto-incremented - creation_timestamp - - timestamptz - name - - text not null - bloom_filter - - bytea not null - currency - - text not null - + + public.PremiumList + + [table] + revision_id + + bigserial not null + + auto-incremented + creation_timestamp + + timestamptz + name + + text not null + bloom_filter + + bytea not null + currency + + text not null + premiumentry_b0060b91:w->premiumlist_7c3ea68b:e - - - - - - - - fko0gw90lpo1tuee56l0nb6y6g5 + + + + + + + + fko0gw90lpo1tuee56l0nb6y6g5 - + rderevision_83396864 - - public.RdeRevision - - [table] - tld - - text not null - mode - - text not null - "date" - - date not null - update_timestamp - - timestamptz - revision - - int4 not null - + + public.RdeRevision + + [table] + tld + + text not null + mode + + text not null + "date" + + date not null + update_timestamp + + timestamptz + revision + + int4 not null + - + registrarpoc_ab47054d @@ -3470,7 +3486,7 @@ td.section { fk_registrar_poc_registrar_id - + registrarupdatehistory_8a38bed4 @@ -3665,7 +3681,7 @@ td.section { fksr7w342s7x5s5jvdti2axqeq8 - + registrarpocupdatehistory_31e5d9aa @@ -3777,251 +3793,251 @@ td.section { fkftpbwctxtkc1i0njc0tdcaa2g - + registrylock_ac88663e - - public.RegistryLock - - [table] - revision_id - - bigserial not null - - auto-incremented - lock_completion_time - - timestamptz - lock_request_time - - timestamptz not null - domain_name - - text not null - is_superuser - - bool not null - registrar_id - - text not null - registrar_poc_id - - text - repo_id - - text not null - verification_code - - text not null - unlock_request_time - - timestamptz - unlock_completion_time - - timestamptz - last_update_time - - timestamptz not null - relock_revision_id - - int8 - relock_duration - - interval - + + public.RegistryLock + + [table] + revision_id + + bigserial not null + + auto-incremented + lock_completion_time + + timestamptz + lock_request_time + + timestamptz not null + domain_name + + text not null + is_superuser + + bool not null + registrar_id + + text not null + registrar_poc_id + + text + repo_id + + text not null + verification_code + + text not null + unlock_request_time + + timestamptz + unlock_completion_time + + timestamptz + last_update_time + + timestamptz not null + relock_revision_id + + int8 + relock_duration + + interval + registrylock_ac88663e:w->registrylock_ac88663e:e - - - - - - - - fk2lhcwpxlnqijr96irylrh1707 + + + + + + + + fk2lhcwpxlnqijr96irylrh1707 - + reservedentry_1a7b8520 - - public.ReservedEntry - - [table] - revision_id - - int8 not null - comment - - text - reservation_type - - int4 not null - domain_label - - text not null - + + public.ReservedEntry + + [table] + revision_id + + int8 not null + comment + + text + reservation_type + + int4 not null + domain_label + + text not null + - + reservedlist_b97c3f1c - - public.ReservedList - - [table] - revision_id - - bigserial not null - - auto-incremented - creation_timestamp - - timestamptz not null - name - - text not null - + + public.ReservedList + + [table] + revision_id + + bigserial not null + + auto-incremented + creation_timestamp + + timestamptz not null + name + + text not null + reservedentry_1a7b8520:w->reservedlist_b97c3f1c:e - - - - - - - - fkgq03rk0bt1hb915dnyvd3vnfc + + + + + + + + fkgq03rk0bt1hb915dnyvd3vnfc - + serversecret_6cc90f09 - - public.ServerSecret - - [table] - secret - - uuid not null - id - - int8 not null - + + public.ServerSecret + + [table] + secret + + uuid not null + id + + int8 not null + - + signedmarkrevocationentry_99c39721 - - public.SignedMarkRevocationEntry - - [table] - revision_id - - int8 not null - revocation_time - - timestamptz not null - smd_id - - text not null - + + public.SignedMarkRevocationEntry + + [table] + revision_id + + int8 not null + revocation_time + + timestamptz not null + smd_id + + text not null + - + signedmarkrevocationlist_c5d968fb - - public.SignedMarkRevocationList - - [table] - revision_id - - bigserial not null - - auto-incremented - creation_time - - timestamptz - + + public.SignedMarkRevocationList + + [table] + revision_id + + bigserial not null + + auto-incremented + creation_time + + timestamptz + signedmarkrevocationentry_99c39721:w->signedmarkrevocationlist_c5d968fb:e - - - - - - - - fk5ivlhvs3121yx2li5tqh54u4 + + + + + + + + fk5ivlhvs3121yx2li5tqh54u4 - + spec11threatmatch_a61228a6 - - public.Spec11ThreatMatch - - [table] - id - - bigserial not null - - auto-incremented - check_date - - date not null - domain_name - - text not null - domain_repo_id - - text not null - registrar_id - - text not null - threat_types - - _text not null - tld - - text not null - + + public.Spec11ThreatMatch + + [table] + id + + bigserial not null + + auto-incremented + check_date + + date not null + domain_name + + text not null + domain_repo_id + + text not null + registrar_id + + text not null + threat_types + + _text not null + tld + + text not null + - + tmchcrl_d282355 - - public.TmchCrl - - [table] - certificate_revocations - - text not null - update_timestamp - - timestamptz not null - url - - text not null - id - - int8 not null - + + public.TmchCrl + + [table] + certificate_revocations + + text not null + update_timestamp + + timestamptz not null + url + + text not null + id + + int8 not null + - + userupdatehistory_24efd476 @@ -8949,6 +8965,60 @@ td.section {

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ public.FeatureFlag [table] +
feature_nametext not null
status"hstore" not null
Primary Key
FeatureFlag_pkey[primary key]
feature_name
Indexes
FeatureFlag_pkey[unique index]
feature_nameascending
+

 

public.GracePeriod [table] diff --git a/db/src/main/resources/sql/flyway.txt b/db/src/main/resources/sql/flyway.txt index 0b319fd0e..09cd7798b 100644 --- a/db/src/main/resources/sql/flyway.txt +++ b/db/src/main/resources/sql/flyway.txt @@ -170,3 +170,4 @@ V169__add_more_indexes_needed_for_delete_prober_data.sql V170__user_update_registry_lock_email.sql V171__drop_create_billing_cost_columns_from_tld.sql V172__allocation_token_renewal_price.sql +V173__create_feature_flag_table.sql diff --git a/db/src/main/resources/sql/flyway/V173__create_feature_flag_table.sql b/db/src/main/resources/sql/flyway/V173__create_feature_flag_table.sql new file mode 100644 index 000000000..cea0d0ded --- /dev/null +++ b/db/src/main/resources/sql/flyway/V173__create_feature_flag_table.sql @@ -0,0 +1,19 @@ +-- Copyright 2024 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 "FeatureFlag" ( + feature_name text not null, + status hstore not null, + primary key (feature_name) +); diff --git a/db/src/main/resources/sql/schema/nomulus.golden.sql b/db/src/main/resources/sql/schema/nomulus.golden.sql index 535174f37..996a29e4d 100644 --- a/db/src/main/resources/sql/schema/nomulus.golden.sql +++ b/db/src/main/resources/sql/schema/nomulus.golden.sql @@ -677,6 +677,16 @@ CREATE SEQUENCE public."DomainTransactionRecord_id_seq" ALTER SEQUENCE public."DomainTransactionRecord_id_seq" OWNED BY public."DomainTransactionRecord".id; +-- +-- Name: FeatureFlag; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public."FeatureFlag" ( + feature_name text NOT NULL, + status public.hstore NOT NULL +); + + -- -- Name: GracePeriod; Type: TABLE; Schema: public; Owner: - -- @@ -1618,6 +1628,14 @@ ALTER TABLE ONLY public."Domain" ADD CONSTRAINT "Domain_pkey" PRIMARY KEY (repo_id); +-- +-- Name: FeatureFlag FeatureFlag_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."FeatureFlag" + ADD CONSTRAINT "FeatureFlag_pkey" PRIMARY KEY (feature_name); + + -- -- Name: GracePeriodHistory GracePeriodHistory_pkey; Type: CONSTRAINT; Schema: public; Owner: - --