diff --git a/core/src/main/java/google/registry/model/billing/BillingEvent.java b/core/src/main/java/google/registry/model/billing/BillingEvent.java index b09881966..21407f900 100644 --- a/core/src/main/java/google/registry/model/billing/BillingEvent.java +++ b/core/src/main/java/google/registry/model/billing/BillingEvent.java @@ -46,6 +46,8 @@ import google.registry.model.domain.rgp.GracePeriodStatus; import google.registry.model.domain.token.AllocationToken; import google.registry.model.reporting.HistoryEntry; import google.registry.model.transfer.TransferData.TransferServerApproveEntity; +import google.registry.persistence.BillingVKey.BillingEventVKey; +import google.registry.persistence.BillingVKey.BillingRecurrenceVKey; import google.registry.persistence.VKey; import google.registry.persistence.WithLongVKey; import google.registry.schema.replay.DatastoreAndSqlEntity; @@ -572,8 +574,7 @@ public abstract class BillingEvent extends ImmutableObject *
Although the type is {@link Key} the name "ref" is preserved for historical reasons.
*/
@IgnoreSave(IfNull.class)
- @Column(name = "billing_event_id")
- VKey Although the type is {@link Key} the name "ref" is preserved for historical reasons.
*/
@IgnoreSave(IfNull.class)
- @Column(name = "billing_recurrence_id")
- VKey
generated on
- 2020-12-21 17:41:59.495189
+ 2021-01-14 16:15:22.842637
@@ -284,7 +284,7 @@ td.section {
generated on
last flyway file
- V83__add_indexes_on_domainhost.sql
+ V84__add_vkey_columns_in_billing_cancellation.sql
generated on
- 2020-12-21 17:41:57.553769
+ 2021-01-14 16:15:20.755734
@@ -284,7 +284,7 @@ td.section {
generated on
last flyway file
- V83__add_indexes_on_domainhost.sql
+ V84__add_vkey_columns_in_billing_cancellation.sql
billing_recurrence_id
int8
+
+
+
+ billing_event_history_id
+ int8
+
+
+
+ billing_event_domain_repo_id
+ text
+
+
+
+ billing_recurrence_history_id
+ int8
+
+
+ billing_recurrence_domain_repo_id
+ text
+
diff --git a/db/src/main/resources/sql/flyway.txt b/db/src/main/resources/sql/flyway.txt
index 5fb661992..72ca9686b 100644
--- a/db/src/main/resources/sql/flyway.txt
+++ b/db/src/main/resources/sql/flyway.txt
@@ -81,3 +81,4 @@ V80__defer_bill_event_key.sql
V81__drop_spec11_fkeys.sql
V82__add_columns_to_restore_symmetric_billing_vkey.sql
V83__add_indexes_on_domainhost.sql
+V84__add_vkey_columns_in_billing_cancellation.sql
diff --git a/db/src/main/resources/sql/flyway/V84__add_vkey_columns_in_billing_cancellation.sql b/db/src/main/resources/sql/flyway/V84__add_vkey_columns_in_billing_cancellation.sql
new file mode 100644
index 000000000..88bd4308d
--- /dev/null
+++ b/db/src/main/resources/sql/flyway/V84__add_vkey_columns_in_billing_cancellation.sql
@@ -0,0 +1,22 @@
+-- Copyright 2021 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.
+
+alter table "BillingCancellation"
+ add column if not exists "billing_event_history_id" int8;
+alter table "BillingCancellation"
+ add column if not exists "billing_event_domain_repo_id" text;
+alter table "BillingCancellation"
+ add column if not exists "billing_recurrence_history_id" int8;
+alter table "BillingCancellation"
+ add column if not exists "billing_recurrence_domain_repo_id" text;
diff --git a/db/src/main/resources/sql/schema/db-schema.sql.generated b/db/src/main/resources/sql/schema/db-schema.sql.generated
index d2f7e642d..d3e8bf2e3 100644
--- a/db/src/main/resources/sql/schema/db-schema.sql.generated
+++ b/db/src/main/resources/sql/schema/db-schema.sql.generated
@@ -40,7 +40,11 @@
domain_name text not null,
billing_time timestamptz,
billing_event_id int8,
+ billing_event_history_id int8,
+ billing_event_domain_repo_id text,
billing_recurrence_id int8,
+ billing_recurrence_history_id int8,
+ billing_recurrence_domain_repo_id text,
primary key (billing_cancellation_id)
);
diff --git a/db/src/main/resources/sql/schema/nomulus.golden.sql b/db/src/main/resources/sql/schema/nomulus.golden.sql
index f80c02c15..5a3854ec7 100644
--- a/db/src/main/resources/sql/schema/nomulus.golden.sql
+++ b/db/src/main/resources/sql/schema/nomulus.golden.sql
@@ -70,7 +70,11 @@ CREATE TABLE public."BillingCancellation" (
domain_name text NOT NULL,
billing_time timestamp with time zone,
billing_event_id bigint,
- billing_recurrence_id bigint
+ billing_recurrence_id bigint,
+ billing_event_history_id bigint,
+ billing_event_domain_repo_id text,
+ billing_recurrence_history_id bigint,
+ billing_recurrence_domain_repo_id text
);