Page MenuHomePhorge

Old entries in kolab_alarms are never removed
Open, 40Public

Description

This table is cleared up only on user delete (if the hook is used at all), but it should be cleared also for existing users.

I propose to fix this by registering gc handler. However, to correctly recognize old entries we need a timestamp. I propose to always set notifyat, even for dismissed alarms, so when an alarm is snoozed we write timestamp as before, but when it is dismissed we write current timestamp instead of NULL. This way we can remove entries that are older than a day.

Index on notifyat column will be useful for such solution. BTW, we have one index redundant. Now:

PRIMARY KEY (`alarm_id`,`user_id`),
KEY `fk_kolab_alarms_user_id` (`user_id`),

if we revert order of columns in the primary key, we'll not need the other key, will we? The same in itipinvitations table.

Details

Ticket Type
Task