Note: how to delete an error calendar in Lightning
As Bug #428274, I can't accept any meeting requests sent to my work mailbox, and have to add the meetings into Lightning manually. This is really annoying. As the bug got fixed, I decided to upgrade Lightning to a 0.9pre nightly to get it working.
After upgrading, the following error dialog will greet me every time I start Thunderbird:
I googled this error message and found that it was caused by the incompatible extension ThunderBirthDay. OK, delete the calendar should fix it. No! The calendar was hide from Lightning's calendar list!
Fine, downgrade Lightning and then remove the calendar should work. But unfortunately, Lightning 0.9 have changed the storage format and can't downgrade to 0.8 anymore.
So how to delete that calendar? Maybe I should delete the calendar direct from Lightning's storage. According to the official FAQ, it's stored as an SQLite database file.
Under Thunderbird's profile directory, I got a "storage.sdb" file. I tried to use the command line sqlite to open it, and it works:
$ sqlite3 storage.sdb SQLite version 3.5.0 Enter ".help" for instructions sqlite> .tables cal_attachments cal_metadata cal_attendees cal_properties cal_calendar_schema_version cal_recurrence cal_calendars cal_relations cal_calendars_prefs cal_todos cal_calmgr_schema_version cal_tz_version cal_events
The "cal_calendars" table seems to be the one I'm looking for:
sqlite> select * from cal_calendars;
1|storage|moz-profile-calendar://
2|thunderbirthday|moz-abmdbdirectory://abook.mab
Yes it is! so I need to know how to delete that record:
sqlite> .schema cal_calendars
CREATE TABLE cal_calendars (id INTEGER PRIMARY KEY, type TEXT, uri TEXT);
OK, then this should work:
sqlite> delete from cal_calendars where type = "thunderbirthday";
sqlite> select * from cal_calendars;
1|storage|moz-profile-calendar://
It DOES work!
Now my Thunderbird is quiet on starting.
But, the guys in Lightning really should give a chance to delete calendars that aren't compatible. I should file a bug for it. I've filed Bug #450121!