clean up orphaned groupings
This commit is contained in:
parent
7ccaa371ed
commit
e41f544f4f
2 changed files with 11 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
7.4.9
|
||||
- fix: Bug that did not allow Calendar Update Feeds workflow activity to
|
||||
complete
|
||||
- Clean up orphaned grouping
|
||||
- fix: purging old asset revisions on large sites never completes
|
||||
|
||||
7.4.8
|
||||
|
|
|
|||
|
|
@ -20,11 +20,20 @@ my $quiet; # this line required
|
|||
|
||||
my $session = start(); # this line required
|
||||
|
||||
# upgrade functions go here
|
||||
removeOrphanedGroupings($session); # upgrade functions go here
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
sub removeOrphanedGroupings {
|
||||
my $session = shift;
|
||||
print "\tCleaning up stale groupings.\n" unless ($quiet);
|
||||
$session->db->write("delete from groupGroupings where inGroup not in (select distinct groupId from groups)");
|
||||
$session->db->write("delete from groupings where groupId not in (select distinct groupId from groups)");
|
||||
}
|
||||
|
||||
|
||||
##-------------------------------------------------
|
||||
#sub exampleFunction {
|
||||
# my $session = shift;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue