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

drush updb should *not* run entity updates by default #3167

Closed
Berdir opened this issue Nov 14, 2017 · 2 comments
Closed

drush updb should *not* run entity updates by default #3167

Berdir opened this issue Nov 14, 2017 · 2 comments

Comments

@Berdir
Copy link
Contributor

Berdir commented Nov 14, 2017

This is the default in Drush 8 but it looks like it changed in Drush 9?

Running entity updates by default is wrong and inconsistent with update.php. It is also wrong to check for differences before running normal updates because update functions must apply specific entity updates so that as a result of running those, there should be no pending entity updates after that, so showing them upfront is scary and misleading.

While some custom sites/updates might rely on using it and that's their choice, it's not reliable (will fail hard and bad if there is data on destructive updates), some users won't use drush, so it shouldn't do that by default.

Also seems to be hiding some entity updates on the 8.4 update if I saw that correctly.

@weitzman
Copy link
Member

OK, happy to make changes here. Can you briefly explain how drupal ui handles this? Drupal shows you the pending entity updates but doesnt run them by default?

@Berdir
Copy link
Contributor Author

Berdir commented Nov 16, 2017

It doesn't handle that at all currently, which is also not optimal and causes its own set of problems, mostly if contrib/custom developers aren't doing what they should :)

Entity updates are a developer tool, because they do not work in all conditions, and should be triggered specifically by update functions.

See https://www.drupal.org/node/2554097 for background. This was actually changed in drush8 when this change originally happened to be consistent with core.

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

No branches or pull requests

2 participants