diff roundup/backends/back_mysql.py @ 6599:39189dd94f2c

issue2551189 - increase size of words in full text index. Increased indexed word maxlength to 50 DB migration code is written and tests work. Restructured some tests to allow for code reuse. Docs. If this passes CI without errors 2551189 should be done. However, testing on my system generates errors. Encoding (indexer unicode russian unicode string invalid) and collation errors (utf8_bin not valid) when running under python2. No issues with python3 and I haven't changed code that should cause these since the last successful build in CI. So if this fails in CI we will have more checkins.
author John Rouillard <rouilj@ieee.org>
date Wed, 26 Jan 2022 15:04:09 -0500
parents e70e2789bc2c
children 38e0fc1c7f11
line wrap: on
line diff
--- a/roundup/backends/back_mysql.py	Wed Jan 26 08:58:46 2022 -0500
+++ b/roundup/backends/back_mysql.py	Wed Jan 26 15:04:09 2022 -0500
@@ -412,6 +412,15 @@
         else:
             self.log_info('No changes needed.')
 
+    def fix_version_6_tables(self):
+        # Modify length for __words._word column.
+        c = self.cursor
+        sql = "alter table __words change column _word _word varchar(%s)" % (
+                                                                   self.arg)
+        # Why magic number 5? It was the original offset between
+        #   column length and maxlength.
+        c.execute(sql, (self.indexer.maxlength + 5,))
+
     def __repr__(self):
         return '<myroundsql 0x%x>'%id(self)
 

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