I downgraded my 5.x-dev version to 5.0-beta10 today and wanted to perform drush updb and I stepped into this.

Drupal\Core\Entity\EntityStorageException: Exception thrown while    [error]
performing a schema update. SQLSTATE[42S22]: Column not found: 1054
Unknown column 'webform_open' in 'where clause': SELECT 1 AS
expression
FROM 
{node_revision__webform} t
WHERE ( (webform_target_id IS NOT NULL ) OR (webform_default_data IS
NOT NULL ) OR (webform_status IS NOT NULL ) OR (webform_open IS NOT
NULL ) OR (webform_close IS NOT NULL ) )
LIMIT 1 OFFSET 0; Array
(
)
 in
Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException()
(line 1478 of
/var/www/vhosts/build/feature-428-webform-update-refactor/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Failed: Drupal\Core\Entity\EntityStorageException: !message in       [error]
Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException()
(line 1478 of
/var/www/vhosts/build/feature-428-webform-update-refactor/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Any help would be really nice.

Comments

Insasse created an issue. See original summary.

jrockowitz’s picture

Your 'webform' field table is missing the open/close columns. I just tagged a new release which might fix this problem.

Please also check your Status report (/admin/reports/status) which may contain a notification about pending field updates which can be fixed by running `drush entity-updates`

jrockowitz’s picture

Priority: Normal » Critical

For now, I am marking this as critical.

DiDebru’s picture

Nope update to beta11 didn't fix it but

drush eval "module_load_install('webform'); webform_update_8025();" 

did the trick :)

matzAB’s picture

Thx @Insasse. That did the trick for me, too ;)

webflo’s picture

Title: webform_open column not found » Update path from beta1 is broken
Category: Support request » Bug report

I found the root cause of all update issues. Webform beta1 was released with schema version 8074 (webform_update_8074). All updates hooks have been removed before beta2 (see http://cgit.drupalcode.org/webform/commit/?id=72fa6a363c903280b5784a96b9...). None of the update hooks will run on sites which had beta1 installed. It is an ongoing issue with upcoming Webform releases.

Webform could fix by skipping a few update hooks and continue with webform_update_8100 as update hook and try to repair the schema of those sites.

jrockowitz’s picture

@webflo Thanks for pinpointing the issue.

I am not up for repairing the schema for sites running beta1 of the webform module. Beta1 installations can backup their config, reinstall the webform module, import the config, and finally run `drush webform-repair`.

At this point, I feel it is more important to focus on stabilizing update hooks for future releases.

jrockowitz’s picture

@Matthias (matzAB) I just would like to say "Welcome to the Drupal community".

webflo’s picture

Status: Active » Closed (won't fix)

@jrockowitz Ok, fair enough. Fixed my site with drush php-eval '\Drupal::keyValue("system.schema")->set("webform", 8000);' to execute all update hooks again. Compared the schema to beta11. Looks good thanks.