Missing 'field_media_lottiefile_addclass' column in database

Created on 3 August 2023, 11 months ago
Updated 13 October 2023, 9 months ago

Problem/Motivation

When adding a new lottiefiles media item, the following error occurs:

Drupal\Core\Entity\EntityStorageException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_media_lottiefile_addclass' in 'field list': INSERT INTO "media__field_media_lottiefile"...

Steps to reproduce

A site with Lottiefiles field installed already that updates to 1.1.8 wonโ€™t have the new 'addclass' column added to the database table since there wasnโ€™t an update hook in the 1.1.8 release.

Proposed resolution

Add an update hook.

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Active

Version

1.1

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States Daniel Korte Brooklyn, NY

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

Comments & Activities

  • Issue created by @Daniel Korte
  • ๐Ÿ‡ถ๐Ÿ‡ฆQatar harivenuv Qatar

    Thank you for reporting this @Daniel, this was i expected, it might be little hard to do this on udpate hook. Meanwhile i'm checking solution for this.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States pbone3b New York, NY

    This is my fault, sorry. I added a new field, and it needs to do a db update? @harivenuv if you figure this out, perhaps I can add it to my V2 patch as well?

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States Daniel Korte Brooklyn, NY

    For anyone else needing help with this, Iโ€™m using this drush command for now:
    drush sqlq "ALTER TABLE media__field_media_lottiefile ADD COLUMN field_media_lottiefile_addclass VARCHAR(32) default ''; ALTER TABLE media_revision__field_media_lottiefile ADD COLUMN field_media_lottiefile_addclass VARCHAR(32) default '';"

Production build 0.69.0 2024