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.
It would be a really good idea to perform this module's database changes using hook_schema_alter() rather than directly changing the tables in hook_(un)install().
Comments
Comment #1
jenlamptonIt looks like hook_schema_alter() doesn't actually alter any tables. All it does is modify the schema variable representing tables. We'll setill need the un/install and update hooks to actually change the database structure. Additionally, I couldn't find any documentation on how to add fulltext indexes via hook_schema_alter().
If anyone knows how to do that, patches welcome :)
Comment #2
joachim CreditAttribution: joachim at Torchbox commented> It looks like hook_schema_alter() doesn't actually alter any tables.
Indeed, you're right -- I misread and misunderstood what it does.
The docs say:
So basically, this module is right to alter the tables directly, but it should also declare the changes it's made in a hook_schema_alter() implementation.