X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=remove_ou_data%2F10_clear_vandelay_reports.sql;h=2a44d2edf7279cab02f71263db0ffa200b3fdc5a;hp=b68bef957f97c29aa7d507edc2aa41c6b9abbc79;hb=7331ec680f6f2f9bd510cafeb6786f68e78adc9e;hpb=234d6c986f42cb7c245205bb299fa2c9d204e52a diff --git a/remove_ou_data/10_clear_vandelay_reports.sql b/remove_ou_data/10_clear_vandelay_reports.sql index b68bef9..2a44d2e 100644 --- a/remove_ou_data/10_clear_vandelay_reports.sql +++ b/remove_ou_data/10_clear_vandelay_reports.sql @@ -55,4 +55,10 @@ DELETE FROM reporter.template WHERE owner IN DELETE FROM reporter.template_folder WHERE owner IN (SELECT id FROM actor.usr WHERE home_ou IN (SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del)); +UPDATE reporter.report_folder SET share_with = NULL WHERE share_with IN +(SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del); + +UPDATE reporter.template_folder SET share_with = NULL WHERE share_with IN +(SELECT (actor.org_unit_descendants(id)).id from actor.org_unit where shortname = :ou_to_del); + COMMIT;