Cached Calendar Database Upgrade

Hello Folks

We recently fixed bug 479867 which does a quite invasive change to the database schema. The change itself is simple, but since the existing cached calendars need to be migrated in some form, it got quite tricky.

If you are having trouble with the upgrade, please leave a comment here or file a bug. Things you should do first:

  • Enable calendar.debug.log and check for any storage related messages
  • Remove or rename $PROFILE/calendar-data/cache.sqlite
    The cache is automatically regenerated if it does not exist. To find your profile,
    see this page

Please also describe what kind of events you have in your calendar (lots of events? more recurring events, or more single events? Accepted invitations?), what kind of calendar you are caching (caldav, google calendar, ics) and what error message you are getting.

9 comments

  1. Peter Pennington

    I have lost all data from my Lightning. I have a calendar-data file with local.sqlite with 472kb but cannot see a cache.sqlite file to sort out. I have enabled the debug.log but where are messages shown?
    If I thunderbird.exe -p my used profile is shown as Apr232010 (I renamed my profile that day after saving the previous profile) but if I search for my profile only the original name shows up.
    If there is a major change in the offing in the way data is to be handled an alert on Mozillazine might be useful before the event rather than on your (obscure) blog after the event.

  2. @Philipp: Is this for Sunbird (comm-1.9.1), Lightning (comm-1.9.2), both, or something trickier like when migrating from one to the other?
    @Peter: “Renaming” a profile in the Profile Manager doesn’t change the directory name on disk. For example my main Firefox profile is named “default” but resides in a directory named “15jqlowi.16may2006”. The correspondence between profile names and directory names can be found by looking inside the profiles.ini file, which is in the parent directory of the profiles (the exact location is both platform- and application-dependent).

  3. Peter Pennington

    Yes, I reminded myself about the .ini file. the annoying thing is that around 21/22nd I lost all data from Lightning when updating to the latest version (1.1a1?)on Shredder 3.2a1

  4. Mateusz Marek

    I’ve got the same problem as Peter here. I’ve been using Thunderbird 3.1pre and recently I updated my Lightning to latest 1.0b2pre version (20100430). Now I can’t see my calendar, though it seems that the data is still there in a file. But somehow Lightning can’t read it. Also there’s no cache.sqlite file in my profile.

  5. I had the same issue on one of my calendars. The others were fine. The one that didn’t work was cached. If I unchecked cache and clicked ok (under properties of that calendar) then opened and clicked cache again, all the data reappeared.

  6. I had the same issue on one of my calendars. The others were fine. The one that didn’t work was cached. If I unchecked cache and clicked ok (under properties of that calendar) then opened and clicked cache again, all the data reappeared.

  7. Now my cached remote calendars either don’t show up at all or have duplicate entries for all cached calendars.
    I have 6 calendars, 3 of which I need to cache for off-line reading.
    I have deleted cache.sqlite as suggested several times.
    I do notice that cache.sqlite does not seem to get written-to when I open and close sunbird but only gets written-to when I toggle one of my calendar’s cache state. Once cache.sqlite is written-to by sunbird I get duplicate entries in my cached calendars.
    I haven’t seen this work right since sunbird 0.8 and I sure wish I had never tried to upgrade to a newer version.
    I’m using sunbird 1.0b2pre and 0.7pre of the Provider for Google Calendar on Windows XP sp3

  8. Tony, this is for comm-1.9.2, we are not further updating comm-1.9.1.
    Peter, there was a regression. Please install the latest nightly, your calendar data might automatically be recovered. Note that data from the missing calendar might show up in a different calendar, this does not happen when upgrading between release versions.
    John do you get any debug info with debug log enabled?

  9. I turned it on but I can’t find the debug log. Anyone know where I could find it?
    thanks, john c.