Default UTF8MB4 for CREATE DATABASE
This commit is contained in:
parent
5d3bf9307f
commit
a2a03c3f70
|
@ -19,7 +19,7 @@
|
||||||
-- Current Database: `friendica`
|
-- 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`;
|
USE `friendica`;
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ function install_post(App $a) {
|
||||||
$db = new dba($dbhost, $dbuser, $dbpass, '', true);
|
$db = new dba($dbhost, $dbuser, $dbpass, '', true);
|
||||||
|
|
||||||
if(! get_db_errno()) {
|
if(! get_db_errno()) {
|
||||||
$r = q("CREATE DATABASE '%s'",
|
$r = q("CREATE DATABASE '%s' DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci",
|
||||||
dbesc($dbdata)
|
dbesc($dbdata)
|
||||||
);
|
);
|
||||||
if ($r) {
|
if ($r) {
|
||||||
|
|
|
@ -100,7 +100,7 @@ sudo ln -fs /vagrant /var/www
|
||||||
cp /vagrant/util/htconfig.vagrant.php /vagrant/.htconfig.php
|
cp /vagrant/util/htconfig.vagrant.php /vagrant/.htconfig.php
|
||||||
|
|
||||||
# create the friendica database
|
# 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
|
# import test database
|
||||||
$MYSQL -uroot -proot friendica < /vagrant/friendica_test_data.sql
|
$MYSQL -uroot -proot friendica < /vagrant/friendica_test_data.sql
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user