diff --git a/Core/Resources/Db/MySQL/db.sql b/Core/Resources/Db/MySQL/db.sql index c3dd2dc..0a23b1d 100644 --- a/Core/Resources/Db/MySQL/db.sql +++ b/Core/Resources/Db/MySQL/db.sql @@ -1,88 +1,89 @@ -# -# This is the empty database schema for Baïkal -# Corresponds to the MySQL Schema definition of project SabreDAV 1.6.4 -# http://code.google.com/p/sabredav/ -# +-- +-- This is the empty database schema for Baïkal +-- Corresponds to the MySQL Schema definition of project SabreDAV 1.8.6 +-- http://code.google.com/p/sabredav/ +-- CREATE TABLE IF NOT EXISTS users ( - id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - username VARCHAR(50), - digesta1 VARCHAR(32), - UNIQUE(username) + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + username VARCHAR(50), + digesta1 VARCHAR(32), + UNIQUE(username) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS principals ( - id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - uri VARCHAR(200) NOT NULL, - email VARCHAR(80), - displayname VARCHAR(80), - vcardurl VARCHAR(80), - UNIQUE(uri) + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + uri VARCHAR(200) NOT NULL, + email VARCHAR(80), + displayname VARCHAR(80), + vcardurl VARCHAR(255), + UNIQUE(uri) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 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) + 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=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS locks ( - id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - owner VARCHAR(100), - timeout INTEGER UNSIGNED, - created INTEGER, - token VARCHAR(100), - scope TINYINT, - depth TINYINT, - uri VARCHAR(1000), - INDEX(token), +CREATE TABLE TABLE IF NOT EXISTS locks ( + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + owner VARCHAR(100), + timeout INTEGER UNSIGNED, + created INTEGER, + token VARCHAR(100), + scope TINYINT, + depth TINYINT, + uri VARCHAR(1000), + INDEX(token), INDEX(uri) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS calendarobjects ( - id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - calendardata MEDIUMBLOB, - uri VARCHAR(200), - calendarid INTEGER UNSIGNED NOT NULL, - lastmodified INT(11), - etag VARCHAR(32), - size INT(11) UNSIGNED NOT NULL, - componenttype VARCHAR(8), - firstoccurence INT(11) UNSIGNED, - lastoccurence INT(11) UNSIGNED, - UNIQUE(calendarid, uri) + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + calendardata MEDIUMBLOB, + uri VARCHAR(200), + calendarid INTEGER UNSIGNED NOT NULL, + lastmodified INT(11) UNSIGNED, + etag VARCHAR(32), + size INT(11) UNSIGNED NOT NULL, + componenttype VARCHAR(8), + firstoccurence INT(11) UNSIGNED, + lastoccurence INT(11) UNSIGNED, + UNIQUE(calendarid, uri) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS calendars ( - id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - principaluri VARCHAR(100), - displayname VARCHAR(100), - uri VARCHAR(200), - ctag INTEGER UNSIGNED NOT NULL DEFAULT '0', - description TEXT, - calendarorder INTEGER UNSIGNED NOT NULL DEFAULT '0', - calendarcolor VARCHAR(10), - timezone TEXT, - components VARCHAR(20), - transparent TINYINT(1) NOT NULL DEFAULT '0', - UNIQUE(principaluri, uri) + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + principaluri VARCHAR(100), + displayname VARCHAR(100), + uri VARCHAR(200), + ctag INTEGER UNSIGNED NOT NULL DEFAULT '0', + description TEXT, + calendarorder INTEGER UNSIGNED NOT NULL DEFAULT '0', + calendarcolor VARCHAR(10), + timezone TEXT, + components VARCHAR(20), + transparent TINYINT(1) NOT NULL DEFAULT '0', + UNIQUE(principaluri, uri) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS addressbooks ( - id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - principaluri VARCHAR(255), - displayname VARCHAR(255), - uri VARCHAR(200), - description TEXT, - ctag INT(11) UNSIGNED NOT NULL DEFAULT '1', - UNIQUE(principaluri, uri) + id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + principaluri VARCHAR(255), + displayname VARCHAR(255), + uri VARCHAR(200), + description TEXT, + ctag INT(11) UNSIGNED NOT NULL DEFAULT '1', + UNIQUE(principaluri, uri) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE cards ( + id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + addressbookid INT(11) UNSIGNED NOT NULL, + carddata MEDIUMBLOB, + uri VARCHAR(200), + lastmodified INT(11) UNSIGNED ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -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 VARCHAR(200), - lastmodified INT(11) UNSIGNED -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file diff --git a/Core/Resources/Db/SQLite/db.sql b/Core/Resources/Db/SQLite/db.sql new file mode 100644 index 0000000..ff96ef3 --- /dev/null +++ b/Core/Resources/Db/SQLite/db.sql @@ -0,0 +1,83 @@ +-- +-- This is the empty database schema for Baïkal +-- Corresponds to the MySQL Schema definition of project SabreDAV 1.8.6 +-- http://code.google.com/p/sabredav/ +-- + +CREATE TABLE addressbooks ( + id integer primary key asc, + principaluri text, + displayname text, + uri text, + description text, + ctag integer +); + +CREATE TABLE cards ( + id integer primary key asc, + addressbookid integer, + carddata blob, + uri text, + lastmodified integer +); + +CREATE TABLE calendarobjects ( + id integer primary key asc, + calendardata blob, + uri text, + calendarid integer, + lastmodified integer, + etag text, + size integer, + componenttype text, + firstoccurence integer, + lastoccurence integer +); + +CREATE TABLE calendars ( + id integer primary key asc, + principaluri text, + displayname text, + uri text, + ctag integer, + description text, + calendarorder integer, + calendarcolor text, + timezone text, + components text, + transparent bool +); + +CREATE TABLE locks ( + id integer primary key asc, + owner text, + timeout integer, + created integer, + token text, + scope integer, + depth integer, + uri text +); + +CREATE TABLE principals ( + id INTEGER PRIMARY KEY ASC, + uri TEXT, + email TEXT, + displayname TEXT, + vcardurl TEXT, + UNIQUE(uri) +); + +CREATE TABLE groupmembers ( + id INTEGER PRIMARY KEY ASC, + principal_id INTEGER, + member_id INTEGER, + UNIQUE(principal_id, member_id) +); + +CREATE TABLE users ( + id integer primary key asc, + username TEXT, + digesta1 TEXT, + UNIQUE(username) +); diff --git a/Core/Resources/Db/SQLite/db.sqlite b/Core/Resources/Db/SQLite/db.sqlite index 89a7013..40daea7 100644 Binary files a/Core/Resources/Db/SQLite/db.sqlite and b/Core/Resources/Db/SQLite/db.sqlite differ