diff --git a/dba/davical.sql b/dba/davical.sql index 8c3ff320..fdc8733e 100644 --- a/dba/davical.sql +++ b/dba/davical.sql @@ -336,13 +336,20 @@ CREATE TABLE addressbook_resource ( org TEXT, url TEXT, fburl TEXT, + caladruri TEXT, caluri TEXT ); CREATE TABLE addressbook_address_adr ( dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE, type TEXT, - adr TEXT, + box_no TEXT, + unit_no TEXT, + street_address TEXT, + locality TEXT, + region TEXT, + postcode TEXT, + country TEXT, property TEXT -- The full text of the property ); @@ -369,7 +376,7 @@ CREATE TABLE calendar_alarm ( description TEXT, next_trigger TIMESTAMP WITH TIME ZONE, component TEXT, -- The full text of the component - trigger_state 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' ); CREATE TABLE calendar_attendee ( @@ -381,6 +388,7 @@ CREATE TABLE calendar_attendee ( role TEXT, rsvp BOOLEAN, property TEXT, -- The full text of the property + attendee_state TEXT, -- Internal DAViCal processing state PRIMARY KEY ( dav_id, attendee ) ); diff --git a/dba/patches/1.2.9.sql b/dba/patches/1.2.9.sql index 5cd347ba..3a3ce04e 100644 --- a/dba/patches/1.2.9.sql +++ b/dba/patches/1.2.9.sql @@ -10,9 +10,27 @@ SELECT check_db_revision(1,2,8); -- Kind of important to have these as first-class citizens ALTER TABLE addressbook_resource ADD COLUMN fburl TEXT DEFAULT NULL; ALTER TABLE addressbook_resource ADD COLUMN caluri TEXT DEFAULT NULL; +ALTER TABLE addressbook_resource ADD COLUMN caladruri TEXT DEFAULT NULL; + +DROP TABLE addressbook_address_adr CASCADE; +CREATE TABLE addressbook_address_adr ( + dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE, + type TEXT, + box_no TEXT, + unit_no TEXT, + street_address TEXT, + locality TEXT, + region TEXT, + postcode TEXT, + country TEXT, + property TEXT -- The full text of the property +); -- 'N' => 'New/Needs setting', 'A' = 'Active', 'O' = 'Old' -ALTER TABLE calendar_alarm ADD COLUMN trigger_state trigger_state CHAR DEFAULT 'N'; +ALTER TABLE calendar_alarm ADD COLUMN trigger_state CHAR DEFAULT 'N'; + +-- Internal DAViCal calendar state +ALTER TABLE calendar_attendee ADD COLUMN attendee_state TEXT; SELECT new_db_revision(1,2,9, 'Septembre' );