DB Update Fail 8004

Created on 16 June 2025, about 2 months ago

Problem/Motivation

Get an error thrown about Duplicate tables when performing a database update after updating the module from 1.3 to 1.5 using composer.

Steps to reproduce

  1. Composer Update 'drupal/authorization:^1.5'
  2. update.php
  3. receive error for authorization_drupal_roles_module update #8004

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

1.5

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jdcrain Manhattan, KS

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jdcrain
  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    Thank you for reporting this bug. I will have a patch for it soon.

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    Hi Joe,

    Sorry to hear there are issues with the upgrade. In 8.x-1.4 we stopped storing mapped user roles on the 'authorization_drupal_roles_roles' role, and started storing them in user_data.

    Which version of Drupal Core are you using?

    I think the error is caused when the 'authorization_drupal_roles_roles' field is removed from the user entity. It looks like the deleted field table already exists: field_deleted_data_21874036cb

    Can you look in the database and confirm both tables exist; field_deleted_data_21874036cb and user__authorization_drupal_roles_roles
    If both exist, delete user__authorization_drupal_roles_roles and try running the update again.

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    The only way I can think that the table, field_deleted_data_21874036cb, already exists is if you restored the database without dropping the existing table.

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

Production build 0.71.5 2024