From b37be736871617e6886414488f626a643e19bdb0 Mon Sep 17 00:00:00 2001 From: GeeHon Date: Tue, 16 Nov 2021 12:20:43 +0800 Subject: [PATCH] support emoji --- app/src/persistence/mysql.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/persistence/mysql.js b/app/src/persistence/mysql.js index 394f71e..1a8360a 100644 --- a/app/src/persistence/mysql.js +++ b/app/src/persistence/mysql.js @@ -29,11 +29,12 @@ async function init() { user, password, database, + charset: 'utf8mb4', }); return new Promise((acc, rej) => { pool.query( - 'CREATE TABLE IF NOT EXISTS todo_items (id varchar(36), name varchar(255), completed boolean)', + 'CREATE TABLE IF NOT EXISTS todo_items (id varchar(36), name varchar(255), completed boolean) DEFAULT CHARSET utf8mb4', err => { if (err) return rej(err);