New version of mysql schema to support utf8mb4 on title, author, and content
This commit is contained in:
parent
1a4daf6c27
commit
37bb24d5ee
@ -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,14 @@ 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');
|
||||
}
|
||||
|
||||
function version_1(PDO $pdo)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user