fix: Last Reply and Replies columns not updating

This commit is contained in:
JT Smith 2007-10-05 20:20:42 +00:00
parent 9167097d11
commit ee85bc1e02
6 changed files with 100 additions and 87 deletions

View file

@ -22,6 +22,7 @@ my $session = start(); # this line required
removeOrphanedGroupings($session); # upgrade functions go here
fixDashboardContentPositions($session);
fixPosts($session);
finish($session); # this line required
@ -36,6 +37,17 @@ sub removeOrphanedGroupings {
}
#-------------------------------------------------
sub fixPosts {
my $session = shift;
my $db = $session->db;
print "\tRemoving unneeded fields from Posts.\n" unless ($quiet);
$db->write("alter table Post drop column dateSubmitted");
$db->write("alter table Post drop column dateUpdated");
$db->write("update Collaboration set sortBy='assetData.revisionDate' where sortBy='dateUpdated'");
$db->write("update Collaboration set sortBy='creationDate' where sortBy='dateSubmitted'");
}
#-------------------------------------------------
sub fixDashboardContentPositions {
my $session = shift;