mirror of
https://github.com/google/nomulus
synced 2026-10-01 12:16:02 +00:00
Make Domain -> BillingEvent FK deferred (#890)
* Make Domain -> BillingEvent FK deferred It appears that Hibernate can sporadically introduce FK constraint failures when updating a Domain to reference a new BillingEvent and then deleting the old BillingEvent, causing a flakey test failure in DomainDeleteFlowTest. This may be due to the fact that this FK relationships is not known to hibernate. An alternate solution appears to be to flush after every update, but that likely has some pretty serious performance implications.
This commit is contained in:
@@ -2064,7 +2064,7 @@ ALTER TABLE ONLY public."Domain"
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."Domain"
|
||||
ADD CONSTRAINT fk_domain_transfer_billing_event_id FOREIGN KEY (transfer_billing_event_id) REFERENCES public."BillingEvent"(billing_event_id);
|
||||
ADD CONSTRAINT fk_domain_transfer_billing_event_id FOREIGN KEY (transfer_billing_event_id) REFERENCES public."BillingEvent"(billing_event_id) DEFERRABLE INITIALLY DEFERRED;
|
||||
|
||||
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user