Add a primary key to calendar_alarm table.

Also fixed a bug in scripts/refresh-alarms.php if there was an
alarm with a duplicate trigger.

This is part of the fix for #276.
This commit is contained in:
Andrew Ruthven committed 2023-02-15 07:42:34 +00:00
1 parent 6819d6d7d1
commit e3b5c331be
5 files changed
+25 -9

No files matched your search

+3 -1
View File
@@ -403,13 +403,15 @@ CREATE TABLE addressbook_address_email (
CREATE TABLE calendar_alarm (
dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE,
count INT,
action TEXT,
trigger TEXT,
summary TEXT,
description TEXT,
next_trigger TIMESTAMP WITH TIME ZONE,
component TEXT, -- The full text of the component
trigger_state CHAR DEFAULT 'N' -- 'N' => 'New/Needs setting', 'A' = 'Active', 'O' = 'Old'
trigger_state CHAR DEFAULT 'N', -- 'N' => 'New/Needs setting', 'A' = 'Active', 'O' = 'Old'
UNIQUE (dav_id, count)
);