mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Switch to utf8mb4 (#12501)
* Switch to utf8mb4 This allows emojis to function correctly * Update URLs
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user