Thanks for the 6.2+ port Nancy. I have a few hundred quotes entries from my previous 5.x installation. However, there appears to be no upgrade option with the 6.x alpha (I am using drupal 6.2) and while the module is able to read the quotes nodes if accessed directly, I only get error messages if trying to view from the block (note that the view link works fine to access the node). In my case, the messages are something like as follows:

user warning: Unknown column 'q.citation' in 'field list' query: quotes_load /* Jay Daverth : quotes_load */ SELECT q.author AS quotes_author, q.citation AS quotes_citation, q.promote AS quotes_promote FROM quotes q WHERE q.vid = 34 in /home/.gomez/jdaverth/www.thehindsightfactor.com/sites/all/modules/quotes/quotes.module on line 221.

I assume there must be some kind of mis-match between tables over the two versions. Also, when accessing the node directly, the author field is blank (which I believe is a related issue, but I can start a new thread if you like)

Comments

nancydru’s picture

Title: MySQL problem upgrading from 5.x » Upgrade paths from 5.x
Component: Performance » Upgrading

Changing title to better reflect the problem, and component to reflect upgrading.

It looks like you are upgrading from a release prior to 5.x-1.2, which is what the 6.x versions are based on. Is it possible for you to upgrade your 5.x system and then re-migrate to 6.2? If not, if you 5.x system is still available, you can still upgrade it to 5.x-1.x-dev (not 5.x-1.2) and use the export feature.

I will look at how to do a conditional update in the install code for -alpha2.

nancydru’s picture

Status: Active » Postponed (maintainer needs more info)

BTW, do you know how to apply patches?

nancydru’s picture

Please add this to the end of quotes.install and make sure the update runs.


/**
 * Implementation of hook_update_N.
 */
function quotes_update_6100() {
  $ret = array();

  // 5.x-1.2 added 'citation'.
  if (!db_column_exists('quotes', 'citation')) {
  $spec = array(
    'description' => t('Source of the quote.'),
    'type' => 'varchar',
    'length' => '255',
    'not null' => false,
    );
    db_add_field($ret, 'quotes', 'citation', $spec);
  }

  return $ret;
}

This worked on an already updated system, but I don't have a non-updated system to test with.

Please post the results.

nancydru’s picture

Assigned: Unassigned » nancydru
Status: Postponed (maintainer needs more info) » Fixed

Committed to 6.x-1.x-dev version.

Dr Jay’s picture

Hi Nancy,

Sorry for the late reply (and for posting to a closed issue) but i was away. In fact, your patch and update both seem to have solved the problem. Many thanks!

nancydru’s picture

Great, glad it works.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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