Switch to utf8mb4 (#12501)

* Switch to utf8mb4

This allows emojis to function correctly

* Update URLs
This commit is contained in:
Jellyfrog
2021-03-01 15:02:26 +01:00
committed by GitHub
parent c612d2d35f
commit 8e2e67d0ee
21 changed files with 2152 additions and 1653 deletions

View File

@@ -55,7 +55,7 @@ if (getenv('DBTEST')) {
// create testing table if needed
$db_config = \config('database.connections.testing');
$connection = new PDO("mysql:host={$db_config['host']};port={$db_config['port']}", $db_config['username'], $db_config['password']);
$result = $connection->query("CREATE DATABASE IF NOT EXISTS {$db_config['database']} CHARACTER SET utf8 COLLATE utf8_unicode_ci");
$result = $connection->query("CREATE DATABASE IF NOT EXISTS {$db_config['database']} CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci");
if ($connection->errorCode() == '42000') {
echo implode(' ', $connection->errorInfo()) . PHP_EOL;
echo "Either create database {$db_config['database']} or populate DB_TEST_USERNAME and DB_TEST_PASSWORD in your .env with credentials that can" . PHP_EOL;