Skip to content

Commit

Permalink
Merge branch '3.1' of github.com:fruux/sabre-dav into 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
evert committed Mar 13, 2016
2 parents b62590b + 9093938 commit ffa9e24
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 51 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ ChangeLog
deleting them.
* #787: Cannot use non-seekable stream-wrappers with range requests.
* Faster XML parsing and generating due to sabre/xml update.
* #793: The Sqlite schema is now more strict and more similar to the MySQL
schema. This solves a problem within Baikal.
* The zip release ships with [sabre/vobject 4.0.3][vobj],
[sabre/http 4.2.1][http], [sabre/event 3.0.0][evnt],
[sabre/uri 1.1.0][uri] and [sabre/xml 1.4.1][xml].
Expand Down
22 changes: 11 additions & 11 deletions examples/sql/sqlite.addressbooks.sql
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
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);
50 changes: 25 additions & 25 deletions examples/sql/sqlite.calendars.sql
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
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,
uid text
);

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,
Expand All @@ -52,13 +52,13 @@ 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);
2 changes: 1 addition & 1 deletion examples/sql/sqlite.locks.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BEGIN TRANSACTION;
CREATE TABLE locks (
id integer primary key asc,
id integer primary key asc NOT NULL,
owner text,
timeout integer,
created integer,
Expand Down
10 changes: 5 additions & 5 deletions examples/sql/sqlite.principals.sql
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
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)
);

Expand Down
8 changes: 4 additions & 4 deletions examples/sql/sqlite.propertystorage.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
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
);

Expand Down
6 changes: 3 additions & 3 deletions examples/sql/sqlite.users.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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)
);

Expand Down
2 changes: 1 addition & 1 deletion tests/Sabre/DAV/PropertyStorage/Backend/PDOMysqlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function getPDO() {
$pdo->exec($sql);

}
$pdo->exec('INSERT INTO propertystorage (path, name, value) VALUES ("dir", "{DAV:}displayname", "Directory")');
$pdo->exec('INSERT INTO propertystorage (path, name, value, valuetype) VALUES ("dir", "{DAV:}displayname", "Directory", 1)');

return $pdo;

Expand Down
2 changes: 1 addition & 1 deletion tests/Sabre/DAV/PropertyStorage/Backend/PDOSqliteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function getPDO() {
$pdo->exec($sql);

}
$pdo->exec('INSERT INTO propertystorage (path, name, value) VALUES ("dir", "{DAV:}displayname", "Directory")');
$pdo->exec('INSERT INTO propertystorage (path, name, value, valuetype) VALUES ("dir", "{DAV:}displayname", "Directory", 1)');

return $pdo;

Expand Down

0 comments on commit ffa9e24

Please sign in to comment.