2 replies [Last post]
matt_harrold@drupal.org's picture
Offline
Bug Finder
Joined: 09/28/2007
Juice: 26

Hi,

I just updated to Ubercart 5.x-1.0-beta1, and attempted to run the database update script.

The update fell in a screaming heap, and has left me with a nasty mess.

Can anyone point me in the direction of some kind of fix for this?

First error message is:

An HTTP error 500 occured. update.php?op=do_update

When I go to the update summary page it says:

The update process was aborted prematurely while running update #2 in uc_flatrate.module.

The details of the error message is:

* user warning: Duplicate column name 'mid' query: ALTER TABLE uc_flatrate_products ADD COLUMN mid mediumint(9) unsigned NOT NULL default 0 AFTER nid in /hsphere/local/home/salproqi/grape.net.au/includes/database.mysql.inc on line 172.
* user warning: Table 'uc_flatrate_methods' already exists query: CREATE TABLE uc_flatrate_methods ( `mid` mediumint(9) unsigned NOT NULL default 0, `title` varchar(255) NOT NULL default '', `label` varchar(255) NOT NULL default '', `base_rate` decimal(10,2) NOT NULL default 0.00, `product_rate` decimal(10,2) NOT NULL default 0.00, PRIMARY KEY (`mid`) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ; in /hsphere/local/home/salproqi/grape.net.au/includes/database.mysql.inc on line 172.
* user warning: Table 'salpro1_grape_www.workflow_ng_cfgs' doesn't exist query: SELECT data FROM workflow_ng_cfgs WHERE name = 'uc_flatrate_get_quote' in /hsphere/local/home/salproqi/grape.net.au/includes/database.mysql.inc on line 172.
* user warning: Table 'salpro1_grape_www.workflow_ng_cfgs' doesn't exist query: SELECT data FROM workflow_ng_cfgs WHERE name = 'uc_flatrate_get_quote_by_order' in /hsphere/local/home/salproqi/grape.net.au/includes/database.mysql.inc on line 172.

cheers,

Matt Harrold

matt_harrold@drupal.org's picture
Offline
Bug Finder
Joined: 09/28/2007
Juice: 26
Re: 5.x-1.0-beta1 schema update failure

A quick update on this issue:

It appears that Workflow_NG has become a prerequisite for the current version of Ubercart, which caused the DB update to fail. I installed the missing module, then ran the DB update again.

I still got a bunch of errors, but most seemed like "already exists" kind of errors, as the updates had already been run a few times.

I'm not sure if I've completely fixed the problem but I don't see any errors at the moment.

Perhaps the update script should check for the presence of Workflow_NG, and if not found, stop dead with an appropriate message?

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6841
Re: Re: 5.x-1.0-beta1 schema update failure

The pages you should check are the flatrate settings page to see that you have the two quote methods that it previously supplied. Also check that the workflow-ng configurations were really set up properly. Everything that the update script was supposed to do, you can do with the interface.

I've been wondering what it would take for the update script to fail like that.