Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swith to utf8mb4 on mysql #201

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion resources/lib/storeMySql.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def getConnection(self):
'user': self.settings.getDatabaseUser(),
'password': self.settings.getDatabasePassword(),
'connect_timeout':24 * 60 * 60,
'charset':'utf8',
'charset':'utf8mb4',
'collation':'utf8mb4_general_ci',
'use_unicode':True

}
Expand Down
6 changes: 3 additions & 3 deletions resources/lib/storeMySqlSetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, dbCon):
self.logger = appContext.MVLOGGER.get_new_logger('StoreMySQLSetup')
self.settings = appContext.MVSETTINGS
self.conn = dbCon
self._setupSchema = 'CREATE DATABASE IF NOT EXISTS `{}` DEFAULT CHARACTER SET utf8;'.format(self.settings.getDatabaseSchema())
self._setupSchema = 'CREATE DATABASE IF NOT EXISTS `{}` DEFAULT CHARACTER SET utf8mb4;'.format(self.settings.getDatabaseSchema())
self._setupScript = """
-- ----------------------------
-- DB V2
Expand Down Expand Up @@ -47,15 +47,15 @@ def __init__(self, dbCon):
url_video varchar(384) NULL,
url_video_sd varchar(384) NULL,
url_video_hd varchar(384) NULL
) ENGINE=InnoDB CHARSET=utf8;
) ENGINE=InnoDB CHARSET=utf8mb4;
--
CREATE INDEX idx_idhash ON film (idhash);
-- ----------------------------
-- Table structure for status
-- ----------------------------
DROP TABLE IF EXISTS status;
CREATE TABLE status (
status varchar(255) NOT NULL,
status varchar(191) NOT NULL,
lastupdate int(11) NOT NULL,
lastFullUpdate int(11) NOT NULL,
filmupdate int(11) NOT NULL,
Expand Down