Document inbox_messageStates clean-up, and write an upgrade script to delete

states from users who have already been deleted.
This commit is contained in:
Colin Kuskie 2009-08-19 15:12:34 +00:00
parent 8ece5d63c6
commit defbec3171
2 changed files with 11 additions and 0 deletions

View file

@ -1,4 +1,5 @@
7.7.18
- fixed #10789: Inbox message states not deleted when a user is deleted
- fixed #10739: Textarea and Codearea resize don't work in IE or Webkit browsers
- fixed #10552: Map: Editing map properties resets zoom level to 0
- fixed #10758: CS #replies does not get updated after post restore from trash (Bart Jol / Procolix)

View file

@ -34,6 +34,7 @@ my $session = start(); # this line required
addSmsGatewaySubjectSetting($session);
addInboxNotificationsSubjectSetting($session);
profileFieldRequiredEditable($session);
deleteOldInboxMessageStates($session);
finish($session); # this line required
#----------------------------------------------------------------------------
@ -45,6 +46,15 @@ finish($session); # this line required
# print "DONE!\n" unless $quiet;
#}
sub deleteOldInboxMessageStates {
my $session = shift;
print "\tDelete Inbox messages states for users who have been deleted... " unless $quiet;
$session->db->write(<<EOSQL);
DELETE FROM inbox_messageState WHERE userId NOT IN (SELECT userId FROM users)
EOSQL
print "DONE!\n" unless $quiet;
}
sub profileFieldRequiredEditable {
my $session = shift;
print "\tTurn on the editable bit for all Profile Fields which are required... " unless $quiet;