[Pkg-owncloud-commits] [php-sabredav] 18/28: Making the Sqlite schema a lot more strict.
David Prévot
taffit at moszumanska.debian.org
Sun Mar 13 17:59:09 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit b9b5d7e6b0d9480c92f73af98f7e846c7cddbadb
Author: Evert Pot <me at evertpot.com>
Date: Sat Mar 12 17:53:24 2016 -0500
Making the Sqlite schema a lot more strict.
---
examples/sql/sqlite.addressbooks.sql | 22 +++++++--------
examples/sql/sqlite.calendars.sql | 48 ++++++++++++++++-----------------
examples/sql/sqlite.locks.sql | 2 +-
examples/sql/sqlite.principals.sql | 8 +++---
examples/sql/sqlite.propertystorage.sql | 8 +++---
examples/sql/sqlite.users.sql | 4 +--
6 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/examples/sql/sqlite.addressbooks.sql b/examples/sql/sqlite.addressbooks.sql
index 8a889aa..0baed8b 100644
--- a/examples/sql/sqlite.addressbooks.sql
+++ b/examples/sql/sqlite.addressbooks.sql
@@ -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);
diff --git a/examples/sql/sqlite.calendars.sql b/examples/sql/sqlite.calendars.sql
index 4a17f0d..87f4779 100644
--- a/examples/sql/sqlite.calendars.sql
+++ b/examples/sql/sqlite.calendars.sql
@@ -1,11 +1,11 @@
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,
@@ -13,34 +13,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,
+ uri text NOT NULL,
+ principaluri text NOT NULL,
+ source text NOT NULL,
displayname text,
refreshrate text,
calendarorder integer,
@@ -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);
diff --git a/examples/sql/sqlite.locks.sql b/examples/sql/sqlite.locks.sql
index fd89b41..622baea 100644
--- a/examples/sql/sqlite.locks.sql
+++ b/examples/sql/sqlite.locks.sql
@@ -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,
diff --git a/examples/sql/sqlite.principals.sql b/examples/sql/sqlite.principals.sql
index 247252f..5337282 100644
--- a/examples/sql/sqlite.principals.sql
+++ b/examples/sql/sqlite.principals.sql
@@ -1,6 +1,6 @@
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)
@@ -8,8 +8,8 @@ CREATE TABLE principals (
CREATE TABLE groupmembers (
id INTEGER PRIMARY KEY ASC,
- principal_id INTEGER,
- member_id INTEGER,
+ principal_id INTEGER NOT NULL,
+ member_id INTEGER NOT NULL,
UNIQUE(principal_id, member_id)
);
diff --git a/examples/sql/sqlite.propertystorage.sql b/examples/sql/sqlite.propertystorage.sql
index 4518179..72e860c 100644
--- a/examples/sql/sqlite.propertystorage.sql
+++ b/examples/sql/sqlite.propertystorage.sql
@@ -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
);
diff --git a/examples/sql/sqlite.users.sql b/examples/sql/sqlite.users.sql
index f4b2c16..7337f18 100644
--- a/examples/sql/sqlite.users.sql
+++ b/examples/sql/sqlite.users.sql
@@ -1,7 +1,7 @@
CREATE TABLE users (
id integer primary key asc,
- username TEXT,
- digesta1 TEXT,
+ username TEXT NOT NULL,
+ digesta1 TEXT NOT NULL,
UNIQUE(username)
);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-php/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list