Updated database definitions. Should fix #559 for good.
This commit is contained in:
parent
ceb107e88f
commit
6e311126dd
2 changed files with 50 additions and 52 deletions
|
@ -51,7 +51,7 @@ CREATE TABLE calendars (
|
|||
calendarorder INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
calendarcolor VARBINARY(10),
|
||||
timezone TEXT,
|
||||
components VARBINARY(20),
|
||||
components VARBINARY(21),
|
||||
transparent TINYINT(1) NOT NULL DEFAULT '0',
|
||||
UNIQUE(principaluri, uri)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
|
|
@ -1,39 +1,39 @@
|
|||
CREATE TABLE addressbooks (
|
||||
id integer primary key asc,
|
||||
principaluri text,
|
||||
id integer primary key asc NOT NULL,
|
||||
principaluri text NOT NULL,
|
||||
displayname text,
|
||||
uri text,
|
||||
uri text NOT NULL,
|
||||
description text,
|
||||
synctoken integer
|
||||
synctoken integer DEFAULT 1 NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE cards (
|
||||
id integer primary key asc,
|
||||
addressbookid integer,
|
||||
id integer primary key asc NOT NULL,
|
||||
addressbookid integer NOT NULL,
|
||||
carddata blob,
|
||||
uri text,
|
||||
uri text NOT NULL,
|
||||
lastmodified integer,
|
||||
etag text,
|
||||
size integer
|
||||
);
|
||||
|
||||
CREATE TABLE addressbookchanges (
|
||||
id integer primary key asc,
|
||||
id integer primary key asc NOT NULL,
|
||||
uri text,
|
||||
synctoken integer,
|
||||
addressbookid integer,
|
||||
operation integer
|
||||
synctoken integer NOT NULL,
|
||||
addressbookid integer NOT NULL,
|
||||
operation integer NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX addressbookid_synctoken ON addressbookchanges (addressbookid, synctoken);
|
||||
CREATE TABLE calendarobjects (
|
||||
id integer primary key asc,
|
||||
calendardata blob,
|
||||
uri text,
|
||||
calendarid integer,
|
||||
lastmodified integer,
|
||||
etag text,
|
||||
size integer,
|
||||
id integer primary key asc NOT NULL,
|
||||
calendardata blob NOT NULL,
|
||||
uri text NOT NULL,
|
||||
calendarid integer NOT NULL,
|
||||
lastmodified integer NOT NULL,
|
||||
etag text NOT NULL,
|
||||
size integer NOT NULL,
|
||||
componenttype text,
|
||||
firstoccurence integer,
|
||||
lastoccurence integer,
|
||||
|
@ -41,34 +41,34 @@ CREATE TABLE calendarobjects (
|
|||
);
|
||||
|
||||
CREATE TABLE calendars (
|
||||
id integer primary key asc,
|
||||
principaluri text,
|
||||
id integer primary key asc NOT NULL,
|
||||
principaluri text NOT NULL,
|
||||
displayname text,
|
||||
uri text,
|
||||
synctoken integer,
|
||||
uri text NOT NULL,
|
||||
synctoken integer DEFAULT 1 NOT NULL,
|
||||
description text,
|
||||
calendarorder integer,
|
||||
calendarcolor text,
|
||||
timezone text,
|
||||
components text,
|
||||
components text NOT NULL,
|
||||
transparent bool
|
||||
);
|
||||
|
||||
CREATE TABLE calendarchanges (
|
||||
id integer primary key asc,
|
||||
id integer primary key asc NOT NULL,
|
||||
uri text,
|
||||
synctoken integer,
|
||||
calendarid integer,
|
||||
operation integer
|
||||
synctoken integer NOT NULL,
|
||||
calendarid integer NOT NULL,
|
||||
operation integer NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX calendarid_synctoken ON calendarchanges (calendarid, synctoken);
|
||||
|
||||
CREATE TABLE calendarsubscriptions (
|
||||
id integer primary key asc,
|
||||
uri text,
|
||||
principaluri text,
|
||||
source text,
|
||||
id integer primary key asc NOT NULL,
|
||||
uri text NOT NULL,
|
||||
principaluri text NOT NULL,
|
||||
source text NOT NULL,
|
||||
displayname text,
|
||||
refreshrate text,
|
||||
calendarorder integer,
|
||||
|
@ -80,19 +80,19 @@ CREATE TABLE calendarsubscriptions (
|
|||
);
|
||||
|
||||
CREATE TABLE schedulingobjects (
|
||||
id integer primary key asc,
|
||||
principaluri text,
|
||||
id integer primary key asc NOT NULL,
|
||||
principaluri text NOT NULL,
|
||||
calendardata blob,
|
||||
uri text,
|
||||
uri text NOT NULL,
|
||||
lastmodified integer,
|
||||
etag text,
|
||||
size integer
|
||||
etag text NOT NULL,
|
||||
size integer NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX principaluri_uri ON calendarsubscriptions (principaluri, uri);
|
||||
BEGIN TRANSACTION;
|
||||
CREATE TABLE locks (
|
||||
id integer primary key asc,
|
||||
id integer primary key asc NOT NULL,
|
||||
owner text,
|
||||
timeout integer,
|
||||
created integer,
|
||||
|
@ -103,35 +103,33 @@ CREATE TABLE locks (
|
|||
);
|
||||
COMMIT;
|
||||
CREATE TABLE principals (
|
||||
id INTEGER PRIMARY KEY ASC,
|
||||
uri TEXT,
|
||||
id INTEGER PRIMARY KEY ASC NOT NULL,
|
||||
uri TEXT NOT NULL,
|
||||
email TEXT,
|
||||
displayname TEXT,
|
||||
UNIQUE(uri)
|
||||
);
|
||||
|
||||
CREATE TABLE groupmembers (
|
||||
id INTEGER PRIMARY KEY ASC,
|
||||
principal_id INTEGER,
|
||||
member_id INTEGER,
|
||||
id INTEGER PRIMARY KEY ASC NOT NULL,
|
||||
principal_id INTEGER NOT NULL,
|
||||
member_id INTEGER NOT NULL,
|
||||
UNIQUE(principal_id, member_id)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE propertystorage (
|
||||
id integer primary key asc,
|
||||
path text,
|
||||
name text,
|
||||
valuetype integer,
|
||||
id integer primary key asc NOT NULL,
|
||||
path text NOT NULL,
|
||||
name text NOT NULL,
|
||||
valuetype integer NOT NULL,
|
||||
value string
|
||||
);
|
||||
|
||||
|
||||
CREATE UNIQUE INDEX path_property ON propertystorage (path, name);
|
||||
CREATE TABLE users (
|
||||
id integer primary key asc,
|
||||
username TEXT,
|
||||
digesta1 TEXT,
|
||||
id integer primary key asc NOT NULL,
|
||||
username TEXT NOT NULL,
|
||||
digesta1 TEXT NOT NULL,
|
||||
UNIQUE(username)
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue