I received the following errors on update:

The following queries were executed
imagecache module
Update #6000

* Failed: ALTER TABLE {imagecache_preset} DROP PRIMARY KEY
* Failed: DELETE FROM {sequences} WHERE name = '{imagecache_preset}_presetid'
* Failed: ALTER TABLE {imagecache_preset} CHANGE presetid `presetid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (presetid)
* Failed: ALTER TABLE {imagecache_action} DROP PRIMARY KEY
* Failed: DELETE FROM {sequences} WHERE name = '{imagecache_action}_actionid'
* Failed: ALTER TABLE {imagecache_action} CHANGE actionid `actionid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (actionid)
* Failed: ALTER TABLE {imagecache_action} ADD INDEX presetid (presetid)

* user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE imagecache_preset DROP PRIMARY KEY in /home/site/public_html/includes/database.mysql-common.inc on line 386.
* user warning: Table 'site_main.sequences' doesn't exist query: DELETE FROM sequences WHERE name = 'imagecache_preset_presetid' in /home/site/public_html/sites/all/modules/imagecache/imagecache.install on line 293.
* user warning: Multiple primary key defined query: ALTER TABLE imagecache_preset CHANGE presetid `presetid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (presetid) in /home/site/public_html/includes/database.mysql-common.inc on line 520.
* user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE imagecache_action DROP PRIMARY KEY in /home/site/public_html/includes/database.mysql-common.inc on line 386.
* user warning: Table 'site_main.sequences' doesn't exist query: DELETE FROM sequences WHERE name = 'imagecache_action_actionid' in /home/site/public_html/sites/all/modules/imagecache/imagecache.install on line 293.
* user warning: Multiple primary key defined query: ALTER TABLE imagecache_action CHANGE actionid `actionid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (actionid) in /home/site/public_html/includes/database.mysql-common.inc on line 520.
* user warning: Duplicate key name 'presetid' query: ALTER TABLE imagecache_action ADD INDEX presetid (presetid) in /home/site/public_html/includes/database.mysql-common.inc on line 434.

Comments

I just updated and had the same errors.

Issue tags:+PostgreSQL, +imagecache, +db update

I'm using PostgreSQL, and have similar issues after downloading imageapi (imageapi-6.x-1.2.tar.gz) then imagecache and finally running update.php.
Seems to stem from "sequences" relation.
System info - D6.8, PG 8.31, PHP 5.2.5, Apache 2.2.8, Mandriva 2008.1

Logs as follows

* warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "sequences" does not exist in /var/www/html/includes/database.pgsql.inc on line 139.
* user warning: query: DELETE FROM sequences WHERE name = 'imagecache_preset_presetid' in /var/www/html/sites/default/modules/imagecache/imagecache.install on line 293.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "sequences" does not exist in /var/www/html/includes/database.pgsql.inc on line 139.
* user warning: query: DELETE FROM sequences WHERE name = 'imagecache_action_actionid' in /var/www/html/sites/default/modules/imagecache/imagecache.install on line 293.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "imagecache_action_presetid_idx" already exists in /var/www/html/includes/database.pgsql.inc on line 139.
* user warning: query: CREATE INDEX imagecache_action_presetid_idx ON imagecache_action (presetid) in /var/www/html/includes/database.pgsql.inc on line 828.

The following queries were executed
imagecache module
Update #6000

* ALTER TABLE {imagecache_preset} DROP CONSTRAINT {imagecache_preset}_pkey
* Failed: DELETE FROM {sequences} WHERE name = '{imagecache_preset}_presetid'
* ALTER TABLE {imagecache_preset} RENAME presetid TO presetid_old
* ALTER TABLE {imagecache_preset} ADD COLUMN presetid serial CHECK (presetid >= 0)
* UPDATE {imagecache_preset} SET presetid = presetid_old
* ALTER TABLE {imagecache_preset} ALTER presetid SET NOT NULL
* ALTER TABLE {imagecache_preset} DROP COLUMN presetid_old
* ALTER TABLE {imagecache_preset} ADD PRIMARY KEY (presetid)
* ALTER TABLE {imagecache_action} DROP CONSTRAINT {imagecache_action}_pkey
* Failed: DELETE FROM {sequences} WHERE name = '{imagecache_action}_actionid'
* ALTER TABLE {imagecache_action} RENAME actionid TO actionid_old
* ALTER TABLE {imagecache_action} ADD COLUMN actionid serial CHECK (actionid >= 0)
* UPDATE {imagecache_action} SET actionid = actionid_old
* ALTER TABLE {imagecache_action} ALTER actionid SET NOT NULL
* ALTER TABLE {imagecache_action} DROP COLUMN actionid_old
* ALTER TABLE {imagecache_action} ADD PRIMARY KEY (actionid)
* Failed: CREATE INDEX {imagecache_action}_presetid_idx ON {imagecache_action} (presetid)

Priority:Normal» Critical

The following queries were executed
imagecache module
Update #6000
    * Failed: ALTER TABLE {imagecache_preset} DROP PRIMARY KEY
    * Failed: DELETE FROM {sequences} WHERE name = '{imagecache_preset}_presetid'
    * Failed: ALTER TABLE {imagecache_preset} CHANGE presetid `presetid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (presetid)
    * Failed: ALTER TABLE {imagecache_action} DROP PRIMARY KEY
    * Failed: DELETE FROM {sequences} WHERE name = '{imagecache_action}_actionid'
    * Failed: ALTER TABLE {imagecache_action} CHANGE actionid `actionid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (actionid)
    * Failed: ALTER TABLE {imagecache_action} ADD INDEX presetid (presetid)

    * user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE imagecache_preset DROP PRIMARY KEY in /.../includes/database.mysql-common.inc on line 386.
    * user warning: Table 'klwhe98234dslfr4.sequences' doesn't exist query: DELETE FROM sequences WHERE name = 'imagecache_preset_presetid' in /.../sites/all/modules/imagecache/imagecache.install on line 293.
    * user warning: Multiple primary key defined query: ALTER TABLE imagecache_preset CHANGE presetid `presetid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (presetid) in /.../includes/database.mysql-common.inc on line 520.
    * user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE imagecache_action DROP PRIMARY KEY in /.../includes/database.mysql-common.inc on line 386.
    * user warning: Table 'klwhe98234dslfr4.sequences' doesn't exist query: DELETE FROM sequences WHERE name = 'imagecache_action_actionid' in /.../sites/all/modules/imagecache/imagecache.install on line 293.
    * user warning: Multiple primary key defined query: ALTER TABLE imagecache_action CHANGE actionid `actionid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (actionid) in /.../includes/database.mysql-common.inc on line 520.
    * user warning: Duplicate key name 'presetid' query: ALTER TABLE imagecache_action ADD INDEX presetid (presetid) in /.../includes/database.mysql-common.inc on line 434.

Category:support» bug

I too had these errors...

me too

where is the table "sequences" ? no creation of that table in .install

same here

same errors here

Drupal 6.8, MySql 5.0.67, PHP 5.2.8

StatusFileSize
new91.92 KB

* user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE imagecache_preset DROP PRIMARY KEY in /var/www/html/drupal6/includes/database.mysql-common.inc on line 386.
* user warning: Table 'topfirmeromania.sequences' doesn't exist query: DELETE FROM sequences WHERE name = 'imagecache_preset_presetid' in /var/www/html/drupal6/sites/all/modules/imagecache/imagecache.install on line 293.
* user warning: Multiple primary key defined query: ALTER TABLE imagecache_preset CHANGE presetid `presetid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (presetid) in /var/www/html/drupal6/includes/database.mysql-common.inc on line 520.
* user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE imagecache_action DROP PRIMARY KEY in /var/www/html/drupal6/includes/database.mysql-common.inc on line 386.
* user warning: Table 'topfirmeromania.sequences' doesn't exist query: DELETE FROM sequences WHERE name = 'imagecache_action_actionid' in /var/www/html/drupal6/sites/all/modules/imagecache/imagecache.install on line 293.
* user warning: Multiple primary key defined query: ALTER TABLE imagecache_action CHANGE actionid `actionid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (actionid) in /var/www/html/drupal6/includes/database.mysql-common.inc on line 520.
* user warning: Duplicate key name 'presetid' query: ALTER TABLE imagecache_action ADD INDEX presetid (presetid) in /var/www/html/drupal6/includes/database.mysql-common.inc on line 434.
* user warning: Can't DROP 'field_logo_alt'; check that column/key exists query: ALTER TABLE content_type_firma DROP COLUMN field_logo_alt in /var/www/html/drupal6/sites/all/modules/imagefield/imagefield.install on line 242.
* user warning: Can't DROP 'field_logo_title'; check that column/key exists query: ALTER TABLE content_type_firma DROP COLUMN field_logo_title in /var/www/html/drupal6/sites/all/modules/imagefield/imagefield.install on line 243.
* user warning: Can't DROP 'field_imagine_alt'; check that column/key exists query: ALTER TABLE content_field_imagine DROP COLUMN field_imagine_alt in /var/www/html/drupal6/sites/all/modules/imagefield/imagefield.install on line 242.
* user warning: Can't DROP 'field_imagine_title'; check that column/key exists query: ALTER TABLE content_field_imagine DROP COLUMN field_imagine_title in /var/www/html/drupal6/sites/all/modules/imagefield/imagefield.install on line 243.

Same issues here.

The problem is this update function imagecache_update_6000() is the Drupal 5 -> 6 update function! Why is it being called?

<?php
/**
* Upgrade from Drupal 5 => Drupal 6.
*
* Use serial data type for primary keys.  Add module field and presetid index.
*/
function imagecache_update_6000() {
}
?>

See the following issue where this function was added:

#304376: Update function from 5.x -> 6.x

ditto - mysql

tried re-updating to 5, and same issues appeared.

subscribe

Same "Barrel o'crap" errors here too. This looks like some legacy DB code from D5 has snuck in??

Edit: After actually READING the SQL, it mostly appears that the errors will only occur if you're NOT upgrading from D5 -> D6. It looks like they are caused by a (forced) move from using the D5 sequences table (deprecated) to autoincrement fields. So, some stuff is removed, and some replaced - BUT if you're already running D6, these will always cause errors, but only when you run update.php.

At least, that is my interpretation, and because I have a headache and can't be bothered to deal with any other possible consequence of this issue, I'm going to ignore it until someone tells me I'm an idiot, and that my trousers are on fire.

That is all.

Same here - subscribing

Got the same thing, hope it's nothing serious! ;)

Priority:Critical» Minor

I don't think we should consider this critical if it doesn't actually hurt anything. As far as I can tell, nothing nasty happened.

Subscribe.

So these errors do nothing?

Status:Active» Needs review
StatusFileSize
new31 bytes

As people have noted if you see errors on this update it shouldn't be a problem. Updated sites ended up getting the D5->D6 upgrade run on them.

This patch just ignores the drops if there's no sequences table and only adds the module column and presetid index if there's no modules column.

Priority:Minor» Normal
StatusFileSize
new1.72 KB

wrong patch..

Priority:Normal» Minor

Looks like your patch file got corrupted somehow. It's only one line, and reads '? imagefield_install_1_0.patch'

Priority:Minor» Normal

woops

Title:db errors after updatedb errors after update_6000
StatusFileSize
new1.55 KB

actually here's another take on it.

Status:Needs review» Fixed

We dun gon fixed it - shouldn't be any more problems related to that.

Status:Fixed» Closed (fixed)
Issue tags:-PostgreSQL, -imagecache, -db update

Automatically closed -- issue fixed for two weeks with no activity.