Error while upgrading from Drupal 5 version to Drupal 6 version

Macarro - November 10, 2009 - 18:08
Project:Custom filter
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

During upgrading from beta 11 you get this error:

user warning: Table 'customfilter_filter' already exists query: ALTER TABLE customfilter_filters RENAME TO customfilter_filter in /home/mysite/www/includes/database.mysql-common.inc on line 249.

I had a working installation of beta 11 with different custom filters defined.

Regards.

#1

Macarro - November 10, 2009 - 18:12

Sorry for double posting, I forgot to add the full error report:

The following queries were executed
customfilter module
Update #6111

    * ALTER TABLE {customfilter_rules} DROP INDEX weight
    * ALTER TABLE {customfilter_rules} ADD INDEX customfilter_rule_fid (fid)
    * ALTER TABLE {customfilter_rules} ADD INDEX customfilter_rule_weight (weight)
    * Failed: ALTER TABLE {customfilter_filters} RENAME TO {customfilter_filter}
    * ALTER TABLE {customfilter_rules} RENAME TO {customfilter_rule}

...and after the failed upgrade you get this watchdog error:

user warning: Table 'mydb.custom_filter' doesn't exist query: SELECT * FROM custom_filter ORDER BY name in /home/mysite/www/sites/all/modules/customfilter/customfilter.module on line 358.

#2

Macarro - November 10, 2009 - 22:26
Priority:normal» critical

...update to "critical" since custom filter stop working.

Regards, thanks in advance and sorry for the triple posting.

UPDATE:

It seems the problem comes from my upgrade from drupal 5 to 6:

Drupal 5: customfilter_filter table
Drupal 6: customfilter_filters table (notice the ending S), so I lost all my filters. I thought it was caused by the drupal core upgrade. So I started from scratch all my filters.
Custom filter upgrade 1.0 beta 11 to beta 12: The module tryes to correct the error with the table name but the old one still exists.

#3

kiamlaluno - November 12, 2009 - 04:26
Title:Error report during upgrading from 6.x-1.0-beta11» Error during upgrading from Drupal 5 version to Drupal 6 version
Component:Database schema» Code

The Drupal 6 branch always used the table name custom_filters. As most of the Drupal core tables are named using the singular (or they are renamed in such way in Drupal 7), I renamed the module tables as well, but I didn't notice the Drupal 5 branch used the new name.

I will fix the problem with the update function.

#4

kiamlaluno - November 12, 2009 - 04:39
Title:Error during upgrading from Drupal 5 version to Drupal 6 version» Error while upgrading from Drupal 5 version to Drupal 6 version
Version:6.x-1.0-beta12» 6.x-1.x-dev
Status:active» fixed

The code has been changed, and committed in CVS.
To resolve the problem you need to manually delete the table custom_filter, and rename custom_filters as custom_filter.

Thanks for your help in finding an upgrade problem.

#5

System Message - November 26, 2009 - 04:40
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.