diff --git a/kallithea/lib/db_manage.py b/kallithea/lib/db_manage.py --- a/kallithea/lib/db_manage.py +++ b/kallithea/lib/db_manage.py @@ -97,7 +97,7 @@ class DbManage(object): engine = sqlalchemy.create_engine(url) with engine.connect() as conn: conn.execute('DROP DATABASE IF EXISTS `%s`' % database) - conn.execute('CREATE DATABASE `%s`' % database) + conn.execute('CREATE DATABASE `%s` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci' % database) elif url.drivername == 'postgresql': from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT url.database = 'postgres' # connect to the system database (as the real one might not exist) diff --git a/kallithea/model/db.py b/kallithea/model/db.py --- a/kallithea/model/db.py +++ b/kallithea/model/db.py @@ -167,7 +167,6 @@ class BaseDbModel(object): _table_args_default_dict = {'extend_existing': True, 'mysql_engine': 'InnoDB', - 'mysql_charset': 'utf8mb4', 'sqlite_autoincrement': True, }