mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-31 03:34:18 +00:00
Some database changes for server-side attendee handling.
This commit is contained in:
parent
7c53722535
commit
1ab66a70b5
@ -406,6 +406,23 @@ CREATE TABLE calendar_alarm (
|
|||||||
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_email_status (
|
||||||
|
email_status_id INT8 PRIMARY KEY,
|
||||||
|
description TEXT NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO calendar_attendee_email_status (email_status_id, description)
|
||||||
|
VALUES
|
||||||
|
(1, 'waiting for invitation to be sent'),
|
||||||
|
(2, 'invitation has been sent'),
|
||||||
|
(3, 'waiting for schedule change to be sent'),
|
||||||
|
(4, 'schedule change has been sent'),
|
||||||
|
(11, 'attendee has accepted'),
|
||||||
|
(12, 'attendee indicated maybe'),
|
||||||
|
(13, 'attendee has refused')
|
||||||
|
;
|
||||||
|
|
||||||
CREATE TABLE calendar_attendee (
|
CREATE TABLE calendar_attendee (
|
||||||
dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||||
status TEXT,
|
status TEXT,
|
||||||
@ -417,6 +434,8 @@ CREATE TABLE calendar_attendee (
|
|||||||
property TEXT, -- The full text of the property
|
property TEXT, -- The full text of the property
|
||||||
attendee_state TEXT, -- Internal DAViCal processing state
|
attendee_state TEXT, -- Internal DAViCal processing state
|
||||||
weak_etag TEXT, -- The week_etag applying for this attendee state
|
weak_etag TEXT, -- The week_etag applying for this attendee state
|
||||||
|
email_status INT REFERENCES calendar_attendee_email_status(email_status_id) DEFAULT 1 NOT NULL,
|
||||||
|
is_remote BOOLEAN DEFAULT false,
|
||||||
PRIMARY KEY ( dav_id, attendee )
|
PRIMARY KEY ( dav_id, attendee )
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -449,4 +468,4 @@ $$ LANGUAGE plpgsql ;
|
|||||||
ALTER TABLE dav_binding ADD CONSTRAINT "dav_name_does_not_exist"
|
ALTER TABLE dav_binding ADD CONSTRAINT "dav_name_does_not_exist"
|
||||||
CHECK (NOT real_path_exists(dav_name));
|
CHECK (NOT real_path_exists(dav_name));
|
||||||
|
|
||||||
SELECT new_db_revision(1,2,12, 'Decembre' );
|
SELECT new_db_revision(1,3,1, 'Styczeń' );
|
||||||
|
|||||||
36
dba/patches/1.3.1.sql
Normal file
36
dba/patches/1.3.1.sql
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
|
||||||
|
-- Notable enhancement: Add/Alter tables for dealing with remote attendee handling
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
SELECT check_db_revision(1,2,12);
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE calendar_attendee_email_status (
|
||||||
|
email_status_id INT8 PRIMARY KEY,
|
||||||
|
description TEXT NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO calendar_attendee_email_status (email_status_id, description)
|
||||||
|
VALUES
|
||||||
|
(1, 'waiting for invitation to be sent'),
|
||||||
|
(2, 'invitation has been sent'),
|
||||||
|
(3, 'waiting for schedule change to be sent'),
|
||||||
|
(4, 'schedule change has been sent'),
|
||||||
|
(11, 'attendee has accepted'),
|
||||||
|
(12, 'attendee indicated maybe'),
|
||||||
|
(13, 'attendee has refused')
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE calendar_attendee
|
||||||
|
ADD COLUMN email_status INT REFERENCES calendar_attendee_email_status(email_status_id) DEFAULT 1 NOT NULL ;
|
||||||
|
|
||||||
|
ALTER TABLE calendar_attendee
|
||||||
|
ADD COLUMN is_remote BOOLEAN DEFAULT FALSE;
|
||||||
|
|
||||||
|
-- A new year! http://blogs.transparent.com/polish/names-of-the-months-and-their-meaning/
|
||||||
|
SELECT new_db_revision(1,3,1, 'Styczeń' );
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
|
ROLLBACK;
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
The database is version 9.4 currently at revision 1.2.11.
|
The database is version 9.5 currently at revision 1.3.1.
|
||||||
No patches were applied.
|
No patches were applied.
|
||||||
Supported locales updated.
|
Supported locales updated.
|
||||||
Updated view: dav_principal.sql applied.
|
Updated view: dav_principal.sql applied.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user