Skip to content

Commit 55b06f0

Browse files
committed
fix: roundup-admin updateconfig warn on mysql_{charset/collation} mismatch
I added a simple test that requires the mysql_charset with a '_' appended to be a prefix of the mysql_collation. The intent is to detect an incompatible charset and collation since collation is now settable in config.ini. This may not be sufficient but...
1 parent 00040ae commit 55b06f0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

roundup/admin.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,8 +865,14 @@ def do_genconfig(self, args, update=False):
865865
if default_ppdr > config.PASSWORD_PBKDF2_DEFAULT_ROUNDS:
866866
print(_("Update "
867867
"'password_pbkdf2_default_rounds' "
868-
"to a number equal to or larger\nthan %s.") %
868+
"to a number equal to or larger\n than %s.\n") %
869869
default_ppdr)
870+
871+
if not config.RDBMS_MYSQL_COLLATION.startswith(
872+
config.RDBMS_MYSQL_CHARSET + "_"):
873+
print(_("Check the rdbms mysql_* settings. Your charset and "
874+
"collations may need\n"
875+
" to be changed. See upgrading instructions.\n"))
870876
else:
871877
# generate default config
872878
config = CoreConfig()

0 commit comments

Comments
 (0)