Skip to content

Commit

Permalink
fix: roundup-admin updateconfig warn on mysql_{charset/collation} mis…
Browse files Browse the repository at this point in the history
…match

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...
  • Loading branch information
rouilj committed Apr 8, 2024
1 parent 00040ae commit 55b06f0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion roundup/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,8 +865,14 @@ def do_genconfig(self, args, update=False):
if default_ppdr > config.PASSWORD_PBKDF2_DEFAULT_ROUNDS:
print(_("Update "
"'password_pbkdf2_default_rounds' "
"to a number equal to or larger\nthan %s.") %
"to a number equal to or larger\n than %s.\n") %
default_ppdr)

if not config.RDBMS_MYSQL_COLLATION.startswith(
config.RDBMS_MYSQL_CHARSET + "_"):
print(_("Check the rdbms mysql_* settings. Your charset and "
"collations may need\n"
" to be changed. See upgrading instructions.\n"))
else:
# generate default config
config = CoreConfig()
Expand Down

0 comments on commit 55b06f0

Please sign in to comment.