Add database schema file for Postgres (#2044)
This commit is contained in:
parent
f53773290d
commit
9df99187df
1 changed files with 31 additions and 0 deletions
31
plugins/calendar/drivers/kolab/SQL/postgres.initial.sql
Normal file
31
plugins/calendar/drivers/kolab/SQL/postgres.initial.sql
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
/**
|
||||||
|
* Roundcube Calendar Kolab backend
|
||||||
|
*
|
||||||
|
* @version @package_version@
|
||||||
|
* @author Thomas Bruederli
|
||||||
|
* @licence GNU AGPL
|
||||||
|
**/
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS kolab_alarms (
|
||||||
|
event_id character varying(255) NOT NULL,
|
||||||
|
user_id integer NOT NULL
|
||||||
|
REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
notifyat timestamp without time zone DEFAULT NULL,
|
||||||
|
dismissed smallint NOT NULL DEFAULT 0,
|
||||||
|
PRIMARY KEY(event_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS itipinvitations (
|
||||||
|
token character varying(64) NOT NULL,
|
||||||
|
event_uid character varying(255) NOT NULL,
|
||||||
|
user_id integer NOT NULL
|
||||||
|
REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
event text NOT NULL,
|
||||||
|
expires timestamp without time zone DEFAULT NULL,
|
||||||
|
cancelled smallint NOT NULL DEFAULT 0,
|
||||||
|
PRIMARY KEY(token)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE INDEX itipinvitations_event_uid_user_id_idx ON itipinvitations (event_uid, user_id);
|
||||||
|
|
||||||
|
INSERT INTO system (name, value) VALUES ('calendar-kolab-version', '2013011000');
|
Loading…
Add table
Reference in a new issue