Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that textgroup is added back when upgrading from d7 #45

Closed
herbdool opened this issue Jan 12, 2021 · 6 comments
Closed

Ensure that textgroup is added back when upgrading from d7 #45

herbdool opened this issue Jan 12, 2021 · 6 comments
Labels

Comments

@herbdool
Copy link
Contributor

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.)

@herbdool herbdool added the bug label Jan 12, 2021
@indigoxela
Copy link
Member

See also this meta issue for upgrade paths: #33

@indigoxela
Copy link
Member

I think, several people did weird things over the years. What we actually should use is hook_schema_alter() - or am I missing something?

@herbdool
Copy link
Contributor Author

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.

@indigoxela
Copy link
Member

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?

@indigoxela
Copy link
Member

indigoxela commented Jan 17, 2021

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

@indigoxela
Copy link
Member

Branch d7-upgrade-path has been merged into 1.x-1.x, which addresses the textgroup problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants