Fix old calendars with bad icalIntervals.

This commit is contained in:
Colin Kuskie 2009-06-14 22:53:45 +00:00
parent f652028ef0
commit d710fde1f2
2 changed files with 12 additions and 0 deletions

View file

@ -31,6 +31,7 @@ my $quiet; # this line required
my $session = start(); # this line required
# upgrade functions go here
setDefaultIcalInterval($session);
finish($session); # this line required
@ -44,6 +45,16 @@ finish($session); # this line required
# print "DONE!\n" unless $quiet;
#}
#----------------------------------------------------------------------------
# Describe what our function does
sub setDefaultIcalInterval {
my $session = shift;
print "\tSet default ICAL interval in older calendars... " unless $quiet;
$session->db->write("UPDATE Calendar SET icalInterval = 7776000 where icalInterval is null or icalInterval = ''");
# and here's our code
print "DONE!\n" unless $quiet;
}
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------