mirror of
https://github.com/google/nomulus
synced 2026-02-12 07:41:34 +00:00
Make ExpandRecurringBillingEventAction SQL-aware (#1181)
There is some complication regarding how the CancellationMatchingBillingEvent of the generated OneTime can be reconstructed when loading from SQL. I decided to only address it in testing as there is no real value to fully reconstruct this VKey in production where we are either in SQL or Ofy mode, both never in both. Therefore the VKey in a particular mode only needs to contain the corresponding key in order to function. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/google/nomulus/1181) <!-- Reviewable:end -->
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
-- 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 "BillingEvent"
|
||||
ADD COLUMN IF NOT EXISTS "recurrence_history_revision_id" INT8;
|
||||
|
||||
ALTER TABLE "BillingEvent" ADD CONSTRAINT fk_billing_event_recurrence_history
|
||||
FOREIGN KEY (domain_repo_id, recurrence_history_revision_id)
|
||||
REFERENCES "DomainHistory"(domain_repo_id, history_revision_id)
|
||||
DEFERRABLE INITIALLY DEFERRED;
|
||||
Reference in New Issue
Block a user