-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clear orphan coverage objects (#891)
* Add clear_orphan_coverage_objects * add CONSTRAINT ON DELETE CASCADE on coverage_objects and hexes * Move coverage_objects update to its own module (set_invalidated_at) Update clear_coverage_objects to also delete old valid clear_coverage_objects * Fix later table and drop olf foreign key * Keep last 10
- Loading branch information
Showing
3 changed files
with
72 additions
and
28 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
mobile_verifier/migrations/38_coverage_objects_cascade_delete.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ALTER TABLE | ||
hexes DROP CONSTRAINT IF EXISTS hexes_uuid_fkey; | ||
|
||
ALTER TABLE | ||
hexes | ||
ADD | ||
CONSTRAINT hexes_uuid_fkey FOREIGN KEY (uuid) REFERENCES coverage_objects(uuid) ON DELETE CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters