Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions backend/util/load_public_dissem_data/remove_tribal_audits.sql
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ WITH
dissemination_secondaryauditor
WHERE
report_id IN (SELECT * FROM report_ids_to_delete)
),
resub_deleted AS (
DELETE FROM
dissemination_resubmission
WHERE
report_id NOT IN (SELECT report_id FROM keepers)
)
DELETE FROM dissemination_general
WHERE report_id IN (SELECT * from report_ids_to_delete);
6 changes: 6 additions & 0 deletions backend/util/load_public_dissem_data/shrink_the_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ WITH keepers AS (
dissemination_secondaryauditor
WHERE
report_id NOT IN (SELECT report_id FROM keepers)
),
resub_deleted AS (
DELETE FROM
dissemination_resubmission
WHERE
report_id NOT IN (SELECT report_id FROM keepers)
)
DELETE FROM dissemination_general
WHERE report_id NOT IN (SELECT report_id from keepers);
Loading