diff options
author | zotlabs <mike@macgirvin.com> | 2017-06-22 20:16:54 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-06-22 20:16:54 -0700 |
commit | 02b7bc08033b21ea5438aa667e8dbb1fd72022bb (patch) | |
tree | 739cc3310448c1becfd66d15e8159ee3c47584c7 /install | |
parent | 681d6ca1dd1e5c16dfb73ada131f2d6b7a24f942 (diff) | |
download | volse-hubzilla-02b7bc08033b21ea5438aa667e8dbb1fd72022bb.tar.gz volse-hubzilla-02b7bc08033b21ea5438aa667e8dbb1fd72022bb.tar.bz2 volse-hubzilla-02b7bc08033b21ea5438aa667e8dbb1fd72022bb.zip |
cdav migration to core
Diffstat (limited to 'install')
-rw-r--r-- | install/schema_mysql.sql | 171 |
1 files changed, 171 insertions, 0 deletions
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index 37b8f1ac0..6938050cf 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -1404,3 +1404,174 @@ CREATE TABLE IF NOT EXISTS `xtag` ( KEY `xtag_hash` (`xtag_hash`), KEY `xtag_flags` (`xtag_flags`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists addressbooks ( + id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + principaluri VARBINARY(255), + displayname VARCHAR(255), + uri VARBINARY(200), + description TEXT, + synctoken INT(11) UNSIGNED NOT NULL DEFAULT '1', + UNIQUE(principaluri(100), uri(100)) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists cards ( + id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + addressbookid INT(11) UNSIGNED NOT NULL, + carddata MEDIUMBLOB, + uri VARBINARY(200), + lastmodified INT(11) UNSIGNED, + etag VARBINARY(32), + size INT(11) UNSIGNED NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists addressbookchanges ( + id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + uri VARBINARY(200) NOT NULL, + synctoken INT(11) UNSIGNED NOT NULL, + addressbookid INT(11) UNSIGNED NOT NULL, + operation TINYINT(1) NOT NULL, + INDEX addressbookid_synctoken (addressbookid, synctoken) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists calendarobjects ( + id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + calendardata MEDIUMBLOB, + uri VARBINARY(200), + calendarid INTEGER UNSIGNED NOT NULL, + lastmodified INT(11) UNSIGNED, + etag VARBINARY(32), + size INT(11) UNSIGNED NOT NULL, + componenttype VARBINARY(8), + firstoccurence INT(11) UNSIGNED, + lastoccurence INT(11) UNSIGNED, + uid VARBINARY(200), + UNIQUE(calendarid, uri), + INDEX calendarid_time (calendarid, firstoccurence) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists calendars ( + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + synctoken INTEGER UNSIGNED NOT NULL DEFAULT '1', + components VARBINARY(21) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists calendarinstances ( + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + calendarid INTEGER UNSIGNED NOT NULL, + principaluri VARBINARY(100), + access TINYINT(1) NOT NULL DEFAULT '1' COMMENT '1 = owner, 2 = read, 3 = readwrite', + displayname VARCHAR(100), + uri VARBINARY(200), + description TEXT, + calendarorder INT(11) UNSIGNED NOT NULL DEFAULT '0', + calendarcolor VARBINARY(10), + timezone TEXT, + transparent TINYINT(1) NOT NULL DEFAULT '0', + share_href VARBINARY(100), + share_displayname VARCHAR(100), + share_invitestatus TINYINT(1) NOT NULL DEFAULT '2' COMMENT '1 = noresponse, 2 = accepted, 3 = declined, 4 = invalid', + UNIQUE(principaluri, uri), + UNIQUE(calendarid, principaluri), + UNIQUE(calendarid, share_href) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists calendarchanges ( + id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + uri VARBINARY(200) NOT NULL, + synctoken INT(11) UNSIGNED NOT NULL, + calendarid INT(11) UNSIGNED NOT NULL, + operation TINYINT(1) NOT NULL, + INDEX calendarid_synctoken (calendarid, synctoken) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists calendarsubscriptions ( + id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + uri VARBINARY(200) NOT NULL, + principaluri VARBINARY(100) NOT NULL, + source TEXT, + displayname VARCHAR(100), + refreshrate VARCHAR(10), + calendarorder INT(11) UNSIGNED NOT NULL DEFAULT '0', + calendarcolor VARBINARY(10), + striptodos TINYINT(1) NULL, + stripalarms TINYINT(1) NULL, + stripattachments TINYINT(1) NULL, + lastmodified INT(11) UNSIGNED, + UNIQUE(principaluri, uri) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists schedulingobjects ( + id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + principaluri VARBINARY(255), + calendardata MEDIUMBLOB, + uri VARBINARY(200), + lastmodified INT(11) UNSIGNED, + etag VARBINARY(32), + size INT(11) UNSIGNED NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists locks ( + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + owner VARCHAR(100), + timeout INTEGER UNSIGNED, + created INTEGER, + token VARBINARY(100), + scope TINYINT, + depth TINYINT, + uri VARBINARY(1000), + INDEX(token), + INDEX(uri(100)) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists principals ( + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + uri VARBINARY(200) NOT NULL, + email VARBINARY(80), + displayname VARCHAR(80), + UNIQUE(uri) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists groupmembers ( + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + principal_id INTEGER UNSIGNED NOT NULL, + member_id INTEGER UNSIGNED NOT NULL, + UNIQUE(principal_id, member_id) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists propertystorage ( + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + path VARBINARY(1024) NOT NULL, + name VARBINARY(100) NOT NULL, + valuetype INT UNSIGNED, + value MEDIUMBLOB +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE UNIQUE INDEX path_property ON propertystorage (path(600), name(100)); + +CREATE TABLE if not exists users ( + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + username VARBINARY(50), + digesta1 VARBINARY(32), + UNIQUE(username) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists calendarinstances ( + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + calendarid INTEGER UNSIGNED NOT NULL, + principaluri VARBINARY(100), + access TINYINT(1) NOT NULL DEFAULT '1' COMMENT '1 = owner, 2 = read, 3 = readwrite', + displayname VARCHAR(100), + uri VARBINARY(200), + description TEXT, + calendarorder INT(11) UNSIGNED NOT NULL DEFAULT '0', + calendarcolor VARBINARY(10), + timezone TEXT, + transparent TINYINT(1) NOT NULL DEFAULT '0', + share_href VARBINARY(100), + share_displayname VARCHAR(100), + share_invitestatus TINYINT(1) NOT NULL DEFAULT '2' COMMENT '1 = noresponse, 2 = accepted, 3 = declined, 4 = invalid', + UNIQUE(principaluri, uri), + UNIQUE(calendarid, principaluri), + UNIQUE(calendarid, share_href) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |