Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When running update.php im getting this
the site is currently being upgraded, though everything else works without errors
The following updates returned messages
draggableviews module
Update #7001
Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes: ALTER TABLE {draggableviews_structure} CHANGE `view_name` `view_name` VARCHAR(128) NOT NULL DEFAULT '' COMMENT 'Makes the order unique for each view.'; Array ( ) in db_change_field() (line 3017 of /mysite/includes/database/database.inc).
Comment | File | Size | Author |
---|---|---|---|
#11 | MYISAM_index_support-2210473-11.patch | 1.96 KB | iStryker |
Comments
Comment #1
P2790 CreditAttribution: P2790 commentedI can confirm I have the same issue
Comment #2
ngreenup CreditAttribution: ngreenup commentedI am also receiving this error
Comment #3
Paulraj Augustin CreditAttribution: Paulraj Augustin commentedI too got the same error.... Any solution??? Please help
Comment #4
sajt CreditAttribution: sajt commentedI think there is no option for upgrade from drupal 6 to drupal 7. Is this true?
Comment #5
amcc CreditAttribution: amcc commentednothings been upgraded on this module for a long time - its not a particularly complicated module so if you'd like to upgrade it shouldnt be too hard
Comment #6
iStryker CreditAttribution: iStryker commentedThere is currently no option upgrade option from Drupal 6 to Drupal 7.
Can you confirm you are gettting this error from upgrade 7.x-1.x to 7.x-2.0.
Comment #7
iStryker CreditAttribution: iStryker commentedDid some more investigation. This is a problem because you are using MYISAM storage engine tables. This has a limit of 100 bytes for a index.
There is an index
'view' => array('view_name', 'view_display', 'args', 'entity_id'),
View Name, View Display and Args are all varchar.MYISAM is the default storage engine for old verisions of MySQL
Comment #8
Rob C CreditAttribution: Rob C commented#2414769: Upgrade fails on database upgrade thats close to this issue, but for innodb. Might help to really fix this. (hope it helps a bit). Updating a table to InnoDB indeed works, but that's not always possible, so this needs to fixed in code.
Comment #9
iStryker CreditAttribution: iStryker commentedYes #2414769 has the same problem.
Yes we should fix this. We can use prefix indexes. The question is what length. If it was only 1 varchar in the index, then 50 would work. Because there is 3 varchar, this does not work.
Comment #10
iStryker CreditAttribution: iStryker commentedI think I made a mistake in #9. It is 55.5 character per column, not per index.
Attached is patch. This should work for 7.x-1.x to 7.x-2.x, 7.x-2.0 to 7.x-2.x and not break current 7.x-2.x-dev.
Comment #11
iStryker CreditAttribution: iStryker commentedBad patch in #10, Try this
Comment #12
Rob C CreditAttribution: Rob C commentedFunctionally the patch in #11 seems to work great! Added it to a huge site's test env and reran the update. No problems at all. Will retest some more on other sites asap.
Comment #13
iStryker CreditAttribution: iStryker commentedOk looks like this will get commit in 7.x-2.2. Adding Parent
Comment #14
lsolesen CreditAttribution: lsolesen commentedAfter applying the patch in #11, I was able to upgrade, so marking as RTBC.
Referenced issue #2446139: Executing draggableviews_update_7203 giving Specified key was too long; max key length is 1000 bytes
Comment #15
Rob C CreditAttribution: Rob C commentedTested with 3 more sites, still RTBC.
Comment #17
iStryker CreditAttribution: iStryker commentedCommitted. @Isolesen double-checking....you said MYISAM was part of the Aegir/BOA stack? I am a little surprised by that, as it is a well built supported stack.
Comment #18
lsolesen CreditAttribution: lsolesen commentedMYISAM is optional on BOA / Aegir. It takes up much less space. There is an explanation here for the BOA stack: https://omega8.cc/faq
Comment #20
kolafson CreditAttribution: kolafson commentedI just ran into this exact problem (with a BOA site that was getting too big due to records being constantly added/removed from a couple tables). Thanks for committing the fix iStriker!
Comment #21
jmart CreditAttribution: jmart commentedThis problem is still in 7.21 code. I still had to apply the patch in #11
Comment #22
iStryker CreditAttribution: iStryker commented@jmart If you are running 7.x-2.1 you will need to to apply patch #11. If you are running 7.x-2.x-dev you do not have to, as it is already fixed on the dev branch. Once 7.x-2.2 comes out you, it will already have #11 in it.