changeset 7869:eb1fbbd53b6c

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...
author John Rouillard <rouilj@ieee.org>
date Mon, 08 Apr 2024 11:55:55 -0400
parents 6c219034bf31
children fe77e4325084
files roundup/admin.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/roundup/admin.py	Sun Apr 07 23:16:58 2024 -0400
+++ b/roundup/admin.py	Mon Apr 08 11:55:55 2024 -0400
@@ -865,8 +865,14 @@
             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()

Roundup Issue Tracker: http://roundup-tracker.org/