Specified key was too long; max key length is 3072 bytes

Created on 9 January 2024, 11 months ago
Updated 10 January 2024, 11 months ago

Having an issue running a database update after updating to version 2.1.3 of this module.

The error message is -

Failed: Drupal\Core\Database\Exception\SchemaTableKeyTooLargeException: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 3072 bytes: ALTER TABLE "draggableviews_structure" CHANGE "args" "args" VARCHAR(1024) NULL DEFAULT '' COMMENT 'Makes the order unique for a given set of arguments'; Array ( ) in Drupal\mysql\Driver\Database\mysql\ExceptionHandler->handleExecutionException() (line 50 of /var/www/html/core/modules/mysql/src/Driver/Database/mysql/ExceptionHandler.php).

I am using MySQL version 5.7

Does anyone have any insight into how to fix this please?

💬 Support request
Status

Active

Version

2.1

Component

Code

Created by

🇬🇧United Kingdom joehuggans Harrogate, UK

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

Comments & Activities

  • Issue created by @joehuggans
  • 🇮🇳India samir_shukla bareilly

    Hi, I installed the latest module in drupal 10.2, and ran drush updb..no issues came. Can you mention which drupal version are you using?Also try to update your drupal core if that helps. T

  • 🇬🇧United Kingdom joehuggans Harrogate, UK

    Hi, this happened before upgrading to Drupal 10, as well as after the upgrade to Drupal 10, currently at 10.2.1.

    Tried on a server to see if it was something strange happening with my local ddev environment but the same issue exists.

  • 🇬🇧United Kingdom joehuggans Harrogate, UK

    Tried with MySQL 8.0 but same error -

    [error] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 3072 bytes: ALTER TABLE "draggableviews_structure" CHANGE "args" "args" VARCHAR(1024) NULL DEFAULT '' COMMENT 'Makes the order unique for a given set of arguments'; Array

    [error] Update failed: draggableviews_update_8105

Production build 0.71.5 2024