Skip to content

Commit

Permalink
Merge pull request #730 from fruux/utf8mb4
Browse files Browse the repository at this point in the history
Switch to utf8mb4 for mysql tables.
  • Loading branch information
evert committed Oct 27, 2015
2 parents 69c1b5c + 3676d97 commit 22e7123
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 16 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
ChangeLog
=========

3.0.6 (2015-??-??)
------------------

* Switched all mysql tables to `utf8mb4` character set, allowing you to use
emoji in some tables where you couldn't before.


3.0.5 (2015-09-15)
------------------

Expand Down
6 changes: 3 additions & 3 deletions examples/sql/mysql.addressbook.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CREATE TABLE addressbooks (
description TEXT,
synctoken INT(11) UNSIGNED NOT NULL DEFAULT '1',
UNIQUE(principaluri(100), uri(100))
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE cards (
id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
Expand All @@ -16,7 +16,7 @@ CREATE TABLE cards (
lastmodified INT(11) UNSIGNED,
etag VARBINARY(32),
size INT(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE addressbookchanges (
id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
Expand All @@ -25,4 +25,4 @@ CREATE TABLE addressbookchanges (
addressbookid INT(11) UNSIGNED NOT NULL,
operation TINYINT(1) NOT NULL,
INDEX addressbookid_synctoken (addressbookid, synctoken)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
10 changes: 5 additions & 5 deletions examples/sql/mysql.calendars.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CREATE TABLE calendarobjects (
lastoccurence INT(11) UNSIGNED,
uid VARBINARY(200),
UNIQUE(calendarid, uri)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE calendars (
id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
Expand All @@ -26,7 +26,7 @@ CREATE TABLE calendars (
components VARBINARY(20),
transparent TINYINT(1) NOT NULL DEFAULT '0',
UNIQUE(principaluri, uri)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE calendarchanges (
id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
Expand All @@ -35,7 +35,7 @@ CREATE TABLE calendarchanges (
calendarid INT(11) UNSIGNED NOT NULL,
operation TINYINT(1) NOT NULL,
INDEX calendarid_synctoken (calendarid, synctoken)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE calendarsubscriptions (
id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
Expand All @@ -51,7 +51,7 @@ CREATE TABLE calendarsubscriptions (
stripattachments TINYINT(1) NULL,
lastmodified INT(11) UNSIGNED,
UNIQUE(principaluri, uri)
);
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE schedulingobjects (
id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
Expand All @@ -61,4 +61,4 @@ CREATE TABLE schedulingobjects (
lastmodified INT(11) UNSIGNED,
etag VARBINARY(32),
size INT(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
3 changes: 1 addition & 2 deletions examples/sql/mysql.locks.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ CREATE TABLE locks (
uri VARBINARY(1000),
INDEX(token),
INDEX(uri(100))
);

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
5 changes: 2 additions & 3 deletions examples/sql/mysql.principals.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ CREATE TABLE principals (
email VARBINARY(80),
displayname VARCHAR(80),
UNIQUE(uri)
);
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE 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)
);

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT INTO principals (uri,email,displayname) VALUES
('principals/admin', '[email protected]','Administrator'),
Expand Down
3 changes: 2 additions & 1 deletion examples/sql/mysql.propertystorage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ CREATE TABLE propertystorage (
name VARBINARY(100) NOT NULL,
valuetype INT UNSIGNED,
value MEDIUMBLOB
);
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE UNIQUE INDEX path_property ON propertystorage (path(600), name(100));
2 changes: 1 addition & 1 deletion examples/sql/mysql.users.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CREATE TABLE users (
username VARBINARY(50),
digesta1 VARBINARY(32),
UNIQUE(username)
);
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT INTO users (username,digesta1) VALUES
('admin', '87fd274b7b6c01e48d7c2f965da8ddf7');
2 changes: 1 addition & 1 deletion lib/DAV/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class Version {
/**
* Full version number
*/
const VERSION = '3.0.5';
const VERSION = '3.0.6';

}

0 comments on commit 22e7123

Please sign in to comment.