]> git.mxchange.org Git - friendica.git/commitdiff
Default UTF8MB4 for CREATE DATABASE
authorAlexandre Alapetite <alexandre@alapetite.fr>
Sun, 16 Apr 2017 14:04:38 +0000 (16:04 +0200)
committerAlexandre Alapetite <alexandre@alapetite.fr>
Sun, 16 Apr 2017 14:04:38 +0000 (16:04 +0200)
friendica_test_data.sql
mod/install.php
util/vagrant_provision.sh

index 6a34272bb6fec284705141f3f1c5e6efd990119e..f3a0081384fb1843655e297d335629b2bef8a274 100644 (file)
@@ -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`;
 
index fbd296a9da565b5b09f45a1349ae2ee12dfa2af6..8854723b767adb46985200c077fcf16f2d189e84 100755 (executable)
@@ -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) {
index 6b7f0b862ef959ba8592e718d06dcb3f9c8ac0ba..39db0d73c42e0cfea95323a0049dfd723f8b38ad 100644 (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