Problem/Motivation

Update 10007 calls drupal_get_module_schema(), which Drupal 11 no longer provides. Drupal 11 sites upgrading from 1.0.0-alpha2 fatal during drush updatedb. The optional reconcile submodule's update 10001 has the same call.

Fresh installs do not hit this path because hook_schema() still creates the tables. Kernel tests that install the current schema also miss it. A Drupal 11 upgrade that runs available updates from 10000 does hit it.

Steps to reproduce

  1. Install 1.0.0-alpha2 on Drupal 11.
  2. Upgrade the package to 1.0.0.
  3. Run drush updatedb -y.

Proposed resolution

Read table specifications from this module's hook_schema() implementation instead of the removed helper. Keep the updates idempotent when the table already exists.

Remaining tasks

  • Replace both calls.
  • Add a kernel test that drops the table and runs the update on Drupal 11.

Comments

jmcerda created an issue. See original summary.

jmcerda’s picture

Fix is in progress on 1.x: updates 10007 and reconcile 10001 now read table specifications from hook_schema() instead of the removed helper. Kernel tests drop the tables and run the updates twice.

  • jmcerda committed bfdef371 on 1.x
    Issue #3621301: Guard update table specs until the table is missing...

  • jmcerda committed 95f5e6e9 on 1.x
    Issue #3621301: Clarify changelog and rename update table specs
    
    Keep \$...

  • jmcerda committed 5c9b8337 on 1.x
    Issue #3621301: Keep the new test doc comment on one line
    

  • jmcerda committed 0dba6674 on 1.x
    Issue #3621301: Wrap Drupal phpcs line-length in update tests
    

  • jmcerda committed 636f1971 on 1.x
    Issue #3621301: Use hook_schema() in Drupal 11 updates
    
    Replace removed...
jmcerda’s picture

Status: Active » Fixed

Fixed on 1.x at f799dc7b3325fbaa1828af586801d624b2c4395f. Updates 10007 and reconcile 10001 now read table specifications from hook_schema(), skip work when the table exists, and throw UpdateException if the schema key is missing. Kernel tests drop the tables and run the updates twice.

1.0.0 remains affected. A 1.0.1 package is required before Drupal 11 sites can updatedb from alpha2.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • jmcerda committed 9210f276 on 1.x
    Issue #3621301: Spell out Composer and clarify 1.0.0 schema state
    

  • jmcerda committed e4cbb4c8 on 1.x
    Issue #3621301: Clarify 1.0.1 upgrade wording
    
    Say Drupal 11 sites can...

  • jmcerda committed 8872d0d2 on 1.x
    Issue #3621301: Prepare 1.0.1 release
    
    Record the Drupal 11 updatedb fix...
jmcerda’s picture

1.0.1 is published: postmark_webhooks 1.0.1. Drupal.org zip SHA-1 42ea04e6d3d1cdc0db2a6293989f918347fbd31c matches packages.drupal.org. Drupal 11 sites that failed update 10007 on 1.0.0 can complete that update on 1.0.1.

Status: Fixed » Closed (fixed)

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