Closed herbdool closed 3 years ago
See also this meta issue for upgrade paths: https://github.com/backdrop-contrib/i18n/issues/33
I think, several people did weird things over the years. What we actually should use is hook_schema_alter()
- or am I missing something?
Maybe, but I think hook_schema_alter only gets called on an install. Here we are doing it on an upgrade where it might already be installed.
Weird idea: we currently lose all data with locale_update_1000(). What if we clone the whole table before that hook and move back the table after that, so following locale update hooks run, but we keep all data?
I'd prefer to do these experiments on a branch: https://github.com/backdrop-contrib/i18n/tree/d7-upgrade-path
@herbdool what do you think?
This is the change
Branch d7-upgrade-path has been merged into 1.x-1.x, which addresses the textgroup problem.
I see that in i18n_string.install it will recreate the textgroup field in i18n_string_install() but for an upgrade that module is already installed. So perhaps also need it in an update hook that runs after textgroup is dropped in locale.install. (Unless we decide to revive it in core.)