Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After updating Internationalization 7.x-1.12 -> 7.x-1.13, Schema contrib module reports: "1 modules with mis-matching tables".
i18n_string
indexes group_context:
declared: array('textgroup', array('context', 50))
actual: array('textgroup', 'context')
Is this a problem?
Site(s) works normally.
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous as a volunteer commentedI believe the internationalization module has a module.install file (don't actually looked into the code, just assuming stuff here) that declares a certain piece of schema that is "array('textgroup', array('context', 50))" but when we updated the website, there was a bug or error that made the actual database maintain the "array('textgroup', 'context')" schema.
Since update.php doesn't correct it, I assume we can only try to correct manually through phpmyadmin or in a new internationalization update (because indeed the website is working perfectly as expected). However, I hope some internationalization module dev more familiarized with this can help us out...
Don't actually know how to replicate it, but perhaps a dev could try to install the module with your succession of versions to see if it's replicated.
*edit:
just looked at i18n_string.install file, line 111:
'group_context' => array('textgroup', array('context', 50)),
So indeed update didn't propagate the changes from this line. Schema has been changed but update is not changing it. I do not know how a module updates it's schema, so my contrib ends here... thou I guess one should look at line 152 i18n_string_install_update_context function and the 214 i18n_string_update_7000 and 242 i18n_string_update_7002 function?
I'm not quite sure how to manually achieve this...
Comment #2
pendaco CreditAttribution: pendaco commentedSame issue here.
I see that the index in locales_source was also updated.
The Schema module doesn't give an error on that one, but that index doesn't contain the 50 size limit on context either.
So both i18n_string and locales_source seem to have slightly incorrect indexes according to what's declared in i18n_string.install (coming from 1.12)
Edit: You could add the size on the group_context index for context via phpmyadmin. That gets rid of the schema error. But a proper upgrade would be better. Perhaps drop both indexes; group_context on i18n_string and textgroup_context on locales_source, and recreate them for everyone?
Comment #3
gyogyika CreditAttribution: gyogyika as a volunteer commentedI manually edited group_context index via phpMyAdmin.
Table: i18n_string
Index: group_context
Column: context[varchar(255)]
Size: 50 - added manually
Other solution is run an SQL query:
ALTER TABLE `YOUR_DATABASE`.`i18n_string` DROP INDEX `group_context`, ADD INDEX `group_context` (`textgroup`, `context`(50)) USING BTREE;
After modification Schema module reports no error.
Thanks for helping me.