Closed (fixed)
Project:
Login Security
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
2 Oct 2009 at 05:12 UTC
Updated:
26 Jun 2014 at 14:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
catchHere's the errors from update.php:
Comment #2
ilo commentedThanks for this catch, catch :)
I've been reviewing the upgrade path and is inacurate at all. First, the 'host' index will never be deleted because it doesn't exist, and second, the PRIMARY key can't be removed this way because it was created using three fields, and to be able to delete, the PRIMARY key should have just 1 field, and should be the autoincremented field: "there can be only one auto column and it must be defined as a key".
mysql only allows to alter a multiple primary key in two conditions:
- single sentence: ALTER TABLE xxx DROP PRIMARY KEY, ADD PRIMARY KEY (field)
or
- creating a index with the autoincrement field.
- droping current primary key.
- creating the new primary key.
- deleting the index of the autoincrement field.
As there's no Drupal API function to perform a DROP ADD in a single sentence, the new update function does the 2nd way..
I've also included the 'name' index to leave 5.x to 6.x updated schema as defined for the installation.
I've not tested (apart than manually using a mysql client) but I guess this should work. Catch, could you give a try to the patch? It's for the 6.x-1.x-dev branch.
Comment #3
catchThanks for this, looks better but not quite there yet - only had time to run the drush update again with the patch:
Comment #4
ilo commentedEnough information, I guess.. Thanks for you time testing this.
Comment #5
catchAll pass updating via drush now. I didn't verify the resulting indexes against the schema or anything, but much better. Thanks!
Comment #6
ilo commentedCommitted to 6.x-1.x-dev. Thanks catch for taking some time to test this, I know it takes sometime :)
I've already tested that final schema matches.