From 0b02a6d123b2014705998c94ddf3d460948d3eac Mon Sep 17 00:00:00 2001
From: redmatrix <git@macgirvin.com>
Date: Tue, 10 May 2016 17:26:44 -0700
Subject: initial sabre upgrade (needs lots of work - to wit: authentication,
 redo the browser interface, and rework event export/import)

---
 vendor/sabre/dav/examples/sql/sqlite.calendars.sql | 64 +++++++++++++++++-----
 1 file changed, 51 insertions(+), 13 deletions(-)

(limited to 'vendor/sabre/dav/examples/sql/sqlite.calendars.sql')

diff --git a/vendor/sabre/dav/examples/sql/sqlite.calendars.sql b/vendor/sabre/dav/examples/sql/sqlite.calendars.sql
index 537789906..a8654032d 100644
--- a/vendor/sabre/dav/examples/sql/sqlite.calendars.sql
+++ b/vendor/sabre/dav/examples/sql/sqlite.calendars.sql
@@ -1,26 +1,64 @@
 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
+    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,
-    ctag 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 NOT NULL,
+    uri text,
+    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 NOT NULL,
+    uri text NOT NULL,
+    principaluri text NOT NULL,
+    source text NOT NULL,
+    displayname text,
+    refreshrate text,
+    calendarorder integer,
+    calendarcolor text,
+    striptodos bool,
+    stripalarms bool,
+    stripattachments bool,
+    lastmodified int
+);
+
+CREATE TABLE schedulingobjects (
+    id integer primary key asc NOT NULL,
+    principaluri text NOT NULL,
+    calendardata blob,
+    uri text NOT NULL,
+    lastmodified integer,
+    etag text NOT NULL,
+    size integer NOT NULL
+);
+
+CREATE INDEX principaluri_uri ON calendarsubscriptions (principaluri, uri);
-- 
cgit v1.2.3


From 66effbfe0827fc61fff6d248797a894213ad20d6 Mon Sep 17 00:00:00 2001
From: Mario Vavti <mario@mariovavti.com>
Date: Sat, 28 May 2016 17:46:24 +0200
Subject: upgrade to sabre32

---
 vendor/sabre/dav/examples/sql/sqlite.calendars.sql | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

(limited to 'vendor/sabre/dav/examples/sql/sqlite.calendars.sql')

diff --git a/vendor/sabre/dav/examples/sql/sqlite.calendars.sql b/vendor/sabre/dav/examples/sql/sqlite.calendars.sql
index a8654032d..1c8070496 100644
--- a/vendor/sabre/dav/examples/sql/sqlite.calendars.sql
+++ b/vendor/sabre/dav/examples/sql/sqlite.calendars.sql
@@ -14,16 +14,28 @@ CREATE TABLE calendarobjects (
 
 CREATE TABLE calendars (
     id integer primary key asc NOT NULL,
-    principaluri text NOT NULL,
+    synctoken integer DEFAULT 1 NOT NULL,
+    components text NOT NULL
+);
+
+CREATE TABLE calendarinstances (
+    id integer primary key asc NOT NULL,
+    calendarid integer NOT NULL,
+    principaluri text NULL,
+    access integer COMMENT '1 = owner, 2 = read, 3 = readwrite' NOT NULL DEFAULT '1',
     displayname text,
     uri text NOT NULL,
-    synctoken integer DEFAULT 1 NOT NULL,
     description text,
     calendarorder integer,
     calendarcolor text,
     timezone text,
-    components text NOT NULL,
-    transparent bool
+    transparent bool,
+    share_href text,
+    share_displayname text,
+    share_invitestatus integer DEFAULT '2',
+    UNIQUE (principaluri, uri),
+    UNIQUE (calendarid, principaluri),
+    UNIQUE (calendarid, share_href)
 );
 
 CREATE TABLE calendarchanges (
-- 
cgit v1.2.3


From aab9766c53e42c3141d0497fce78977d262efbc1 Mon Sep 17 00:00:00 2001
From: Mario Vavti <mario@mariovavti.com>
Date: Sun, 29 May 2016 00:33:28 +0200
Subject: missed some files

---
 vendor/sabre/dav/examples/sql/sqlite.calendars.sql | 76 ----------------------
 1 file changed, 76 deletions(-)
 delete mode 100644 vendor/sabre/dav/examples/sql/sqlite.calendars.sql

(limited to 'vendor/sabre/dav/examples/sql/sqlite.calendars.sql')

diff --git a/vendor/sabre/dav/examples/sql/sqlite.calendars.sql b/vendor/sabre/dav/examples/sql/sqlite.calendars.sql
deleted file mode 100644
index 1c8070496..000000000
--- a/vendor/sabre/dav/examples/sql/sqlite.calendars.sql
+++ /dev/null
@@ -1,76 +0,0 @@
-CREATE TABLE calendarobjects (
-    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 NOT NULL,
-    synctoken integer DEFAULT 1 NOT NULL,
-    components text NOT NULL
-);
-
-CREATE TABLE calendarinstances (
-    id integer primary key asc NOT NULL,
-    calendarid integer NOT NULL,
-    principaluri text NULL,
-    access integer COMMENT '1 = owner, 2 = read, 3 = readwrite' NOT NULL DEFAULT '1',
-    displayname text,
-    uri text NOT NULL,
-    description text,
-    calendarorder integer,
-    calendarcolor text,
-    timezone text,
-    transparent bool,
-    share_href text,
-    share_displayname text,
-    share_invitestatus integer DEFAULT '2',
-    UNIQUE (principaluri, uri),
-    UNIQUE (calendarid, principaluri),
-    UNIQUE (calendarid, share_href)
-);
-
-CREATE TABLE calendarchanges (
-    id integer primary key asc NOT NULL,
-    uri text,
-    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 NOT NULL,
-    uri text NOT NULL,
-    principaluri text NOT NULL,
-    source text NOT NULL,
-    displayname text,
-    refreshrate text,
-    calendarorder integer,
-    calendarcolor text,
-    striptodos bool,
-    stripalarms bool,
-    stripattachments bool,
-    lastmodified int
-);
-
-CREATE TABLE schedulingobjects (
-    id integer primary key asc NOT NULL,
-    principaluri text NOT NULL,
-    calendardata blob,
-    uri text NOT NULL,
-    lastmodified integer,
-    etag text NOT NULL,
-    size integer NOT NULL
-);
-
-CREATE INDEX principaluri_uri ON calendarsubscriptions (principaluri, uri);
-- 
cgit v1.2.3

