Use ReplaySpecializer to fix DomainBase replays (#991)

* Use ReplaySpecializer to fix DomainBase replays

DomainBase currently has a number of ancillary objects that require a
cascading delete that doesn't get propagated.  Implement beforeSqlDelete() in
DomainContent to delete these child entities.

* Remove unnecessary Query variable

* Fix rebase error
This commit is contained in:
Michael Muller
2021-03-10 17:24:23 -05:00
committed by GitHub
parent 79b4cb0d82
commit 7b673c90db
8 changed files with 85 additions and 19 deletions
@@ -0,0 +1,20 @@
-- 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 "Host" DROP CONSTRAINT fk_host_superordinate_domain;
ALTER TABLE if exists "Host"
ADD CONSTRAINT fk_host_superordinate_domain
FOREIGN KEY (superordinate_domain)
REFERENCES "Domain"(repo_id)
DEFERRABLE INITIALLY DEFERRED;