Merge pull request #3326 from Alkarex/utf8mb4

Default to utf8mb4
This commit is contained in:
Michael Vogel 2017-04-20 05:28:16 +02:00 committed by GitHub
commit 83cc56e713
6 changed files with 106 additions and 161 deletions

View file

@ -7,7 +7,7 @@
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@ -19,7 +19,7 @@
-- Current Database: `friendica`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `friendica` /*!40100 DEFAULT CHARACTER SET latin1 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `friendica` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */;
USE `friendica`;
@ -29,7 +29,7 @@ USE `friendica`;
DROP TABLE IF EXISTS `addon`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `addon` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
@ -39,7 +39,7 @@ CREATE TABLE `addon` (
`timestamp` bigint(20) NOT NULL DEFAULT '0',
`plugin_admin` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -57,7 +57,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `attach`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `attach` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
@ -73,7 +73,7 @@ CREATE TABLE `attach` (
`deny_cid` mediumtext NOT NULL,
`deny_gid` mediumtext NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -91,7 +91,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `auth_codes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `auth_codes` (
`id` varchar(40) NOT NULL,
`client_id` varchar(20) NOT NULL DEFAULT '',
@ -99,7 +99,7 @@ CREATE TABLE `auth_codes` (
`expires` int(11) NOT NULL DEFAULT '0',
`scope` varchar(250) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -117,14 +117,14 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `cache`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `cache` (
`k` varchar(255) NOT NULL,
`v` text NOT NULL,
`updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
PRIMARY KEY (`k`),
KEY `updated` (`updated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -143,7 +143,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `challenge`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `challenge` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`challenge` varchar(255) NOT NULL DEFAULT '',
@ -152,7 +152,7 @@ CREATE TABLE `challenge` (
`type` varchar(255) NOT NULL DEFAULT '',
`last_update` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -170,7 +170,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `clients`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `clients` (
`client_id` varchar(20) NOT NULL,
`pw` varchar(20) NOT NULL DEFAULT '',
@ -179,7 +179,7 @@ CREATE TABLE `clients` (
`icon` text,
`uid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -197,7 +197,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `config`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `config` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`cat` varchar(255) NOT NULL DEFAULT '',
@ -205,7 +205,7 @@ CREATE TABLE `config` (
`v` text NOT NULL,
PRIMARY KEY (`id`),
KEY `cat_k` (`cat`(30),`k`(30))
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -224,7 +224,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `contact`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `contact` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
@ -291,7 +291,7 @@ CREATE TABLE `contact` (
`ffi_keyword_blacklist` mediumtext NOT NULL,
PRIMARY KEY (`id`),
KEY `uid` (`uid`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -310,7 +310,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `conv`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `conv` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`guid` varchar(64) NOT NULL DEFAULT '',
@ -322,7 +322,7 @@ CREATE TABLE `conv` (
`subject` mediumtext NOT NULL,
PRIMARY KEY (`id`),
KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -340,14 +340,14 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `deliverq`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `deliverq` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`cmd` varchar(32) NOT NULL DEFAULT '',
`item` int(11) NOT NULL DEFAULT '0',
`contact` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -365,14 +365,14 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `dsprphotoq`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `dsprphotoq` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
`msg` mediumtext NOT NULL,
`attempt` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -390,7 +390,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `event`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `event` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
@ -413,7 +413,7 @@ CREATE TABLE `event` (
`deny_gid` mediumtext NOT NULL,
PRIMARY KEY (`id`),
KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -431,7 +431,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `fcontact`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `fcontact` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`url` varchar(255) NOT NULL DEFAULT '',
@ -451,7 +451,7 @@ CREATE TABLE `fcontact` (
`updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
PRIMARY KEY (`id`),
KEY `addr` (`addr`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -469,14 +469,14 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `ffinder`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `ffinder` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL DEFAULT '0',
`cid` int(10) unsigned NOT NULL DEFAULT '0',
`fid` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -494,7 +494,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `fserver`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `fserver` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`server` varchar(255) NOT NULL DEFAULT '',
@ -502,7 +502,7 @@ CREATE TABLE `fserver` (
`key` text NOT NULL,
PRIMARY KEY (`id`),
KEY `server` (`server`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -520,7 +520,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `fsuggest`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `fsuggest` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
@ -532,7 +532,7 @@ CREATE TABLE `fsuggest` (
`note` text NOT NULL,
`created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -550,7 +550,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `gcign`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `gcign` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
@ -558,7 +558,7 @@ CREATE TABLE `gcign` (
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
KEY `gcid` (`gcid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -576,7 +576,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `gcontact`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `gcontact` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
@ -592,7 +592,7 @@ CREATE TABLE `gcontact` (
`network` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `nurl` (`nurl`)
) ENGINE=InnoDB AUTO_INCREMENT=157 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=157 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -611,7 +611,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `glink`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `glink` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`cid` int(11) NOT NULL DEFAULT '0',
@ -623,7 +623,7 @@ CREATE TABLE `glink` (
KEY `cid_uid_gcid_zcid` (`cid`,`uid`,`gcid`,`zcid`),
KEY `gcid` (`gcid`),
KEY `zcid` (`zcid`)
) ENGINE=InnoDB AUTO_INCREMENT=189 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=189 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -642,7 +642,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `group`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `group` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL DEFAULT '0',
@ -651,7 +651,7 @@ CREATE TABLE `group` (
`name` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `uid` (`uid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -670,7 +670,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `group_member`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `group_member` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL DEFAULT '0',
@ -678,7 +678,7 @@ CREATE TABLE `group_member` (
`contact-id` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `uid_gid_contactid` (`uid`,`gid`,`contact-id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -697,13 +697,13 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `guid`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `guid` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`guid` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `guid` (`guid`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -722,7 +722,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `hook`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `hook` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`hook` varchar(255) NOT NULL DEFAULT '',
@ -731,7 +731,7 @@ CREATE TABLE `hook` (
`priority` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `hook_file_function` (`hook`(30),`file`(60),`function`(30))
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -749,7 +749,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `intro`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `intro` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL DEFAULT '0',
@ -763,7 +763,7 @@ CREATE TABLE `intro` (
`blocked` tinyint(1) NOT NULL DEFAULT '1',
`ignore` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -782,7 +782,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `item`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `item` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`guid` varchar(255) NOT NULL DEFAULT '',
@ -876,7 +876,7 @@ CREATE TABLE `item` (
KEY `uid_eventid` (`uid`,`event-id`),
KEY `uid_authorlink` (`uid`,`author-link`),
KEY `uid_ownerlink` (`uid`,`owner-link`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -895,7 +895,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `item_id`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `item_id` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iid` int(11) NOT NULL DEFAULT '0',
@ -907,7 +907,7 @@ CREATE TABLE `item_id` (
KEY `sid` (`sid`),
KEY `service` (`service`),
KEY `iid` (`iid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -925,14 +925,14 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `locks`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `locks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(128) NOT NULL DEFAULT '',
`locked` tinyint(1) NOT NULL DEFAULT '0',
`created` datetime DEFAULT '0001-01-01 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -950,7 +950,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `mail`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `mail` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL DEFAULT '0',
@ -976,7 +976,7 @@ CREATE TABLE `mail` (
KEY `reply` (`reply`),
KEY `uri` (`uri`),
KEY `parent-uri` (`parent-uri`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -994,7 +994,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `mailacct`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `mailacct` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
@ -1010,7 +1010,7 @@ CREATE TABLE `mailacct` (
`pubmail` tinyint(1) NOT NULL DEFAULT '0',
`last_check` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1028,14 +1028,14 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `manage`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `manage` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
`mid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `uid_mid` (`uid`,`mid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1053,7 +1053,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `notify`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `notify` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`hash` varchar(64) NOT NULL DEFAULT '',
@ -1071,7 +1071,7 @@ CREATE TABLE `notify` (
`otype` varchar(16) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `uid` (`uid`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1090,7 +1090,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `notify-threads`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `notify-threads` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`notify-id` int(11) NOT NULL DEFAULT '0',
@ -1100,7 +1100,7 @@ CREATE TABLE `notify-threads` (
PRIMARY KEY (`id`),
KEY `master-parent-item` (`master-parent-item`),
KEY `receiver-uid` (`receiver-uid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1119,7 +1119,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `pconfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `pconfig` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
@ -1128,7 +1128,7 @@ CREATE TABLE `pconfig` (
`v` mediumtext NOT NULL,
PRIMARY KEY (`id`),
KEY `uid_cat_k` (`uid`,`cat`(30),`k`(30))
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1147,7 +1147,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `photo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `photo` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL DEFAULT '0',
@ -1175,7 +1175,7 @@ CREATE TABLE `photo` (
KEY `uid` (`uid`),
KEY `resource-id` (`resource-id`),
KEY `guid` (`guid`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1194,7 +1194,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `poll`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `poll` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
@ -1210,7 +1210,7 @@ CREATE TABLE `poll` (
`q9` mediumtext NOT NULL,
PRIMARY KEY (`id`),
KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1228,7 +1228,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `poll_result`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `poll_result` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`poll_id` int(11) NOT NULL DEFAULT '0',
@ -1236,7 +1236,7 @@ CREATE TABLE `poll_result` (
PRIMARY KEY (`id`),
KEY `poll_id` (`poll_id`),
KEY `choice` (`choice`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1254,7 +1254,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `profile`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `profile` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
@ -1299,7 +1299,7 @@ CREATE TABLE `profile` (
`net-publish` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `hometown` (`hometown`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1318,7 +1318,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `profile_check`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `profile_check` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL DEFAULT '0',
@ -1327,7 +1327,7 @@ CREATE TABLE `profile_check` (
`sec` varchar(255) NOT NULL DEFAULT '',
`expire` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1345,7 +1345,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `push_subscriber`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `push_subscriber` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
@ -1356,7 +1356,7 @@ CREATE TABLE `push_subscriber` (
`last_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
`secret` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1374,7 +1374,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `queue`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `queue` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cid` int(11) NOT NULL DEFAULT '0',
@ -1389,7 +1389,7 @@ CREATE TABLE `queue` (
KEY `last` (`last`),
KEY `network` (`network`),
KEY `batch` (`batch`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1407,7 +1407,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `register`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `register` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`hash` varchar(255) NOT NULL DEFAULT '',
@ -1416,7 +1416,7 @@ CREATE TABLE `register` (
`password` varchar(255) NOT NULL DEFAULT '',
`language` varchar(16) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1434,7 +1434,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `search`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `search` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
@ -1442,7 +1442,7 @@ CREATE TABLE `search` (
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
KEY `term` (`term`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1460,7 +1460,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `session`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `session` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`sid` varchar(255) NOT NULL DEFAULT '',
@ -1469,7 +1469,7 @@ CREATE TABLE `session` (
PRIMARY KEY (`id`),
KEY `sid` (`sid`),
KEY `expire` (`expire`)
) ENGINE=InnoDB AUTO_INCREMENT=123 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=123 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1488,7 +1488,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `sign`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `sign` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`iid` int(10) unsigned NOT NULL DEFAULT '0',
@ -1499,7 +1499,7 @@ CREATE TABLE `sign` (
PRIMARY KEY (`id`),
KEY `iid` (`iid`),
KEY `retract_iid` (`retract_iid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1517,7 +1517,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `spam`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `spam` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
@ -1530,7 +1530,7 @@ CREATE TABLE `spam` (
KEY `spam` (`spam`),
KEY `ham` (`ham`),
KEY `term` (`term`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1548,7 +1548,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `term`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `term` (
`tid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`oid` int(10) unsigned NOT NULL DEFAULT '0',
@ -1564,7 +1564,7 @@ CREATE TABLE `term` (
KEY `type_term` (`type`,`term`),
KEY `uid_otype_type_term_tid` (`uid`,`otype`,`type`,`term`,`tid`),
KEY `otype_type_term_tid` (`otype`,`type`,`term`,`tid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1582,7 +1582,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `thread`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `thread` (
`iid` int(10) unsigned NOT NULL DEFAULT '0',
`uid` int(10) unsigned NOT NULL DEFAULT '0',
@ -1617,7 +1617,7 @@ CREATE TABLE `thread` (
KEY `wall_private_received` (`wall`,`private`,`received`),
KEY `uid_created` (`uid`,`created`),
KEY `uid_commented` (`uid`,`commented`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1636,7 +1636,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `tokens`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `tokens` (
`id` varchar(40) NOT NULL,
`secret` text NOT NULL,
@ -1645,7 +1645,7 @@ CREATE TABLE `tokens` (
`scope` varchar(200) NOT NULL DEFAULT '',
`uid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1663,7 +1663,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `user` (
`uid` int(11) NOT NULL AUTO_INCREMENT,
`guid` varchar(64) NOT NULL DEFAULT '',
@ -1709,7 +1709,7 @@ CREATE TABLE `user` (
`openidserver` text NOT NULL,
PRIMARY KEY (`uid`),
KEY `nickname` (`nickname`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -1728,13 +1728,13 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `userd`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `userd` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--

View file

@ -16,7 +16,7 @@ $db_user = 'mysqlusername';
$db_pass = 'mysqlpassword';
$db_data = 'mysqldatabasename';
// Set the database connection charset to UTF8.
// Set the database connection charset to full Unicode (utf8mb4).
// Changing this value will likely corrupt the special characters.
// You have been warned.
$a->config['system']['db_charset'] = "utf8mb4";

View file

@ -48,7 +48,7 @@ function install_post(App $a) {
$db = new dba($dbhost, $dbuser, $dbpass, '', true);
if(! get_db_errno()) {
$r = q("CREATE DATABASE '%s'",
$r = q("CREATE DATABASE '%s' DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci",
dbesc($dbdata)
);
if ($r) {

View file

@ -100,7 +100,7 @@ sudo ln -fs /vagrant /var/www
cp /vagrant/util/htconfig.vagrant.php /vagrant/.htconfig.php
# create the friendica database
echo "create database friendica" | mysql -u root -proot
echo "create database friendica DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci" | mysql -u root -proot
# import test database
$MYSQL -uroot -proot friendica < /vagrant/friendica_test_data.sql

View file

@ -15,7 +15,7 @@ $db_user = '{{$dbuser}}';
$db_pass = '{{$dbpass}}';
$db_data = '{{$dbdata}}';
// Set the database connection charset to UTF8.
// Set the database connection charset to full Unicode (utf8mb4).
// Changing this value will likely corrupt the special characters.
// You have been warned.
$a->config['system']['db_charset'] = "utf8mb4";

View file

@ -1,55 +0,0 @@
<?php return array (
'components' =>
array (
'db' =>
array (
'class' => 'yii\\db\\Connection',
'dsn' => 'mysql:host=127.0.0.1;dbname=installer',
'username' => 'root',
'password' => 'root',
'charset' => 'utf8',
),
'user' =>
array (
),
'mailer' =>
array (
'transport' =>
array (
'class' => 'Swift_MailTransport',
),
),
'view' =>
array (
'theme' =>
array (
'name' => 'HumHub',
),
),
'formatter' =>
array (
'defaultTimeZone' => 'Europe/Berlin',
),
'formatterApp' =>
array (
'defaultTimeZone' => 'Europe/Berlin',
'timeZone' => 'Europe/Berlin',
),
),
'params' =>
array (
'installer' =>
array (
'db' =>
array (
'installer_hostname' => '127.0.0.1',
'installer_database' => 'installer',
),
),
'config_created_at' => 1440430541,
'installed' => true,
),
'name' => 'Installer',
'language' => 'de',
'timeZone' => 'Europe/Berlin',
); ?>