hi and thanks for a great module!

running drupal 6.8.0-
with nodequeue 6.x-2.x-dev (2009-Jan-06)

just installed the above, from the previous dev version-
and ran the required database update...

and got the following errors-

Failed: ALTER TABLE {nodequeue_queue} DROP PRIMARY KEY

Failed: ALTER TABLE {nodequeue_queue} CHANGE qid `qid` INT NOT NULL auto_increment, ADD PRIMARY KEY (qid)

Failed: ALTER TABLE {nodequeue_subqueue} DROP PRIMARY KEY

Failed: ALTER TABLE {nodequeue_subqueue} CHANGE sqid `sqid` INT NOT NULL auto_increment, ADD PRIMARY KEY (sqid)

then i saw this...
http://drupal.org/node/351886

and looked in my DB with phpmyadmin...
not sure but it seems that these changes were / are already present?

it appears that maybe this update is intended to be executed, perhaps
only on upgrades from 5.x?

i have attached screencaps from phpmyadmin for the two tables-
can please someone take a look at this, and the code, below for #6002-
and let me know if this is good?

function nodequeue_update_6002() {
  $ret = array();

  db_drop_primary_key($ret, 'nodequeue_queue');

  db_change_field($ret, 'nodequeue_queue', 'qid', 'qid',
  array('type' => 'serial', 'not null' => TRUE),
  array('primary key' => array('qid')));

  db_drop_primary_key($ret, 'nodequeue_subqueue');

  db_change_field($ret, 'nodequeue_subqueue', 'sqid', 'sqid',
  array('type' => 'serial', 'not null' => TRUE),
  array('primary key' => array('sqid')));
  return $ret;

}

please advise and thanks!

vincent, in buffalo

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ezra-g’s picture

Thanks for the quick feedback. I'll look into whether we can just add a warning that some queries might fail and that this is OK or whether that update needs to be changed.

amitaibu’s picture

subscribe

ezra-g’s picture

Status: Active » Fixed

I moved this update to 5205 in the 6.x branch only so that it will only run for users upgrading from Drupal 5 and tested. Thanks to davereid for that suggestion in IRC and basicmagic.net for the helpful error report!

Status: Fixed » Closed (fixed)

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