With Drupal and Drush 8 there is a new option for the drush updb command.

It is "--entity-updates", which do "Run automatic entity schema updates at the end of any update hooks. Defaults to --no-entity-updates."

Is it already planned to have this feature or can I try to make a patch for that?

Members fund testing for the Drupal project. Drupal Association Learn more


Grimreaper created an issue. See original summary.

colan’s picture

Project: Hostmaster (Aegir) » Provision


Please make sure that the option is only added if the version of Drush supports it. I'm quite sure it'll fail otherwise.

Grimreaper’s picture

Project: Provision » Aegir Hosting Tasks Extra
Status: Active » Needs review
2.7 KB

Here is a first patch.

I am currently searching how to verify the Drush compatibility to display or not the checkbox.

Grimreaper’s picture

I also did not see the Drupal major version stored for the site or the platform.

I think to be able to add condition on the checkbox, we need to store the Drush version somewhere and also the Drupal major version in the platform or in the site.

For the moment I will stay on my first patch and will see another issue.

helmo’s picture

2.42 KB

Drush 8 is the first version that supports Drupal8 anyway ... so I see no need for an extra check there.

Checking for the drupal core version is possible though ... see patch.

Grimreaper’s picture


Thanks @helmo. I tested your patch and it is ok.

colan’s picture

+++ b/drush/provision_tasks_extra.drush.inc
@@ -97,8 +97,15 @@ function drush_provision_tasks_extra_provision_run_cron() {
+  if (isset($options['entity_updates']) && $options['entity_updates'] && drush_drupal_major_version(d()->root) == 8) {

Might want to do ">= 8" here. Looks good otherwise.

Grimreaper’s picture

Thanks for the review.

Here is a patch that take @colan suggestion into account.

  • helmo committed c0a0e3e on 7.x-3.x
    Issue #2830557 by Grimreaper, helmo: Support for --entity-updates option...

  • helmo committed 073a588 on 7.x-3.x authored by Grimreaper
    Issue #2830557 by Grimreaper, helmo, colan: Support for --entity-updates...
helmo’s picture

Status: Needs review » Fixed

added #8

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.