Merge pull request #628
New mysql schema supports utf8mb4 on selected columns
This commit is contained in:
commit
9e296d6cc6
@ -47,7 +47,7 @@ function get_connection_parameters()
|
||||
'password' => DB_PASSWORD,
|
||||
'database' => DB_NAME,
|
||||
'port' => DB_PORT,
|
||||
'charset' => 'utf8',
|
||||
'charset' => 'utf8mb4',
|
||||
);
|
||||
} else {
|
||||
require_once __DIR__.'/../schemas/sqlite.php';
|
||||
|
@ -5,7 +5,15 @@ namespace Miniflux\Schema;
|
||||
use PDO;
|
||||
use Miniflux\Helper;
|
||||
|
||||
const VERSION = 1;
|
||||
const VERSION = 2;
|
||||
|
||||
function version_2(PDO $pdo)
|
||||
{
|
||||
$pdo->exec('ALTER TABLE items CHANGE title title TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL');
|
||||
$pdo->exec('ALTER TABLE items CHANGE author author TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci');
|
||||
$pdo->exec('ALTER TABLE items CHANGE content content LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci');
|
||||
$pdo->exec('ALTER TABLE feeds CHANGE title title VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci');
|
||||
}
|
||||
|
||||
function version_1(PDO $pdo)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user