[Pkg-owncloud-commits] [php-sabredav] 03/11: Optimized a bunch of column types in the mysql example.

David Prévot taffit at moszumanska.debian.org
Thu May 22 17:11:49 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabredav.

commit 040087027ba0ca8e23fd4da33aadd23bb025c4a5
Author: Evert Pot <evert at rooftopsolutions.nl>
Date:   Tue May 20 12:47:21 2014 -0400

    Optimized a bunch of column types in the mysql example.
---
 examples/sql/mysql.addressbook.sql |  2 +-
 examples/sql/mysql.calendars.sql   | 14 +++++++-------
 examples/sql/mysql.locks.sql       |  6 +++---
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/examples/sql/mysql.addressbook.sql b/examples/sql/mysql.addressbook.sql
index f603ad4..e8047db 100644
--- a/examples/sql/mysql.addressbook.sql
+++ b/examples/sql/mysql.addressbook.sql
@@ -5,7 +5,7 @@ CREATE TABLE addressbooks (
     uri VARCHAR(200),
     description TEXT,
     ctag INT(11) UNSIGNED NOT NULL DEFAULT '1',
-    UNIQUE(principaluri, uri)
+    UNIQUE(principaluri(100), uri(100))
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
 
 CREATE TABLE cards (
diff --git a/examples/sql/mysql.calendars.sql b/examples/sql/mysql.calendars.sql
index a8eb102..86ee4d8 100644
--- a/examples/sql/mysql.calendars.sql
+++ b/examples/sql/mysql.calendars.sql
@@ -1,12 +1,12 @@
 CREATE TABLE calendarobjects (
     id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
     calendardata MEDIUMBLOB,
-    uri VARCHAR(200),
+    uri VARBINARY(200),
     calendarid INTEGER UNSIGNED NOT NULL,
     lastmodified INT(11) UNSIGNED,
-    etag VARCHAR(32),
+    etag VARBINARY(32),
     size INT(11) UNSIGNED NOT NULL,
-    componenttype VARCHAR(8),
+    componenttype VARBINARY(8),
     firstoccurence INT(11) UNSIGNED,
     lastoccurence INT(11) UNSIGNED,
     UNIQUE(calendarid, uri)
@@ -14,15 +14,15 @@ CREATE TABLE calendarobjects (
 
 CREATE TABLE calendars (
     id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
-    principaluri VARCHAR(100),
+    principaluri VARBINARY(100),
     displayname VARCHAR(100),
-    uri VARCHAR(200),
+    uri VARBINARY(200),
     ctag INTEGER UNSIGNED NOT NULL DEFAULT '0',
     description TEXT,
     calendarorder INTEGER UNSIGNED NOT NULL DEFAULT '0',
-    calendarcolor VARCHAR(10),
+    calendarcolor VARBINARY(10),
     timezone TEXT,
-    components VARCHAR(20),
+    components VARBINARY(20),
     transparent TINYINT(1) NOT NULL DEFAULT '0',
     UNIQUE(principaluri, uri)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
diff --git a/examples/sql/mysql.locks.sql b/examples/sql/mysql.locks.sql
index cf3caf4..6dda3db 100644
--- a/examples/sql/mysql.locks.sql
+++ b/examples/sql/mysql.locks.sql
@@ -3,11 +3,11 @@ CREATE TABLE locks (
     owner VARCHAR(100),
     timeout INTEGER UNSIGNED,
     created INTEGER,
-    token VARCHAR(100),
+    token VARBINARY(100),
     scope TINYINT,
     depth TINYINT,
-    uri VARCHAR(1000),
+    uri VARBINARY(1000),
     INDEX(token),
-    INDEX(uri)
+    INDEX(uri(100))
 );
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list