mirror of
https://github.com/google/nomulus.git
synced 2025-08-11 20:19:37 +02: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:
parent
586189d7ee
commit
aa2898ebfc
10 changed files with 4755 additions and 4438 deletions
|
@ -97,7 +97,8 @@ CREATE TABLE public."BillingEvent" (
|
|||
cost_amount numeric(19,2),
|
||||
cost_currency text,
|
||||
period_years integer,
|
||||
synthetic_creation_time timestamp with time zone
|
||||
synthetic_creation_time timestamp with time zone,
|
||||
recurrence_history_revision_id bigint
|
||||
);
|
||||
|
||||
|
||||
|
@ -1985,6 +1986,14 @@ ALTER TABLE ONLY public."BillingEvent"
|
|||
ADD CONSTRAINT fk_billing_event_domain_history FOREIGN KEY (domain_repo_id, domain_history_revision_id) REFERENCES public."DomainHistory"(domain_repo_id, history_revision_id) DEFERRABLE INITIALLY DEFERRED;
|
||||
|
||||
|
||||
--
|
||||
-- Name: BillingEvent fk_billing_event_recurrence_history; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."BillingEvent"
|
||||
ADD CONSTRAINT fk_billing_event_recurrence_history FOREIGN KEY (domain_repo_id, recurrence_history_revision_id) REFERENCES public."DomainHistory"(domain_repo_id, history_revision_id) DEFERRABLE INITIALLY DEFERRED;
|
||||
|
||||
|
||||
--
|
||||
-- Name: BillingEvent fk_billing_event_registrar_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue