ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Error 1060: updating 2.2.2 to 2.3.1

December 04, 2011 11:13am

Subscribe [2]
  • #1 / Dec 04, 2011 11:13am

    NKT com

    124 posts

    I get this error when trying to upgrade from version 2.2.2 to 2.3.1.

    A Database Error Occurred
    Error Number: 1060
    
    Duplicate column name 'can_search'
    
    ALTER TABLE exp_member_groups ADD COLUMN can_search char(1) NOT NULL default 'n'
    
    Filename: updates/ud_009.php
    
    Line Number: 112
  • #2 / Dec 05, 2011 1:18pm

    Dan Decker

    7338 posts

    Hi NKT com,

    I’m sorry you ran into this issue. The first step to resolving this is to roll your database back to the backup you captured before you began the update process. Make sure you have a read through the Upgrade Troubleshooting Wiki. Since this error happened so early in the update process (ud_009.php is the very *first* update file…) I would ask that once your database is rolled back, have a look at the exp_member_groups table in PHPMyAdmin or a similar tool. Look for the column ‘can_search’ in that table and see if it already exists.

    After you get your database restored, try the upgrade again and let us know if you need any help.

    Thanks!

  • #3 / Dec 05, 2011 3:32pm

    NKT com

    124 posts

    The ‘can_search’ column does already exist.

    So I delete that column and try again? As just restoring the database and trying didn’t work.

  • #4 / Dec 06, 2011 2:51am

    NKT com

    124 posts

    I dropped the column and now the error shows…

    A Database Error Occurred
    Error Number: 1060
    
    Duplicate column name 'search_flood_control'
    
    ALTER TABLE exp_member_groups ADD COLUMN search_flood_control mediumint(5) unsigned NOT NULL
    
    Filename: updates/ud_009.php
    
    Line Number: 112

    I guess I just keep repeating the process until there is no error? 😛

  • #5 / Dec 06, 2011 8:35pm

    Sean C. Smith

    3818 posts

    NKT com,

    What do you mean restoring the database didn’t work. Could you explain more of what happened.

    I would recommend trying to restore the database once again. When you do this you should delete the current database and restore your old database as per the instructions about retrying a failed upgrade that Dan linked to above.

    Sean

  • #6 / Dec 07, 2011 2:40am

    NKT com

    124 posts

    Hi Sean,

    I did delete the whole database before restoring the backup. That part had worked fine.

    I then checked for the ‘can_search’ column which was there (in the pre upgrade restored database) and deleted that coumn.

    I went through the update process again but it presented me with the new error. This time about the ‘search_flood_control’ column from ud_009.php

  • #7 / Dec 08, 2011 3:06pm

    Dan Decker

    7338 posts

    Hi NKT com,

    I spoke with one of the Devs on this, and the upd_009.php script shouldn’t be trying to run at all. Infact, nothing before upd_222.php should try to run. So in order to a handle on this, can you open /system/expressionengine/config/config.php and look at the value near line 14 for:

    $config['app_version'] = '231';

    If that value is blank or shows anything other than “222”, let us know.

    Thanks!

  • #8 / Dec 09, 2011 7:39am

    NKT com

    124 posts

    Hi Dan,

    I’ve found the problem but I don’t know how to fix it. My config.php file looks like this…

    <?php if ( ! defined('BASEPATH')) exit('Invalid file request');
    
    $config['protect_javascript'] = "n";
    $config['app_version'] = "0";
    ?>

    I try to restore an old version with all the settings in place but as soon as I hit /admin.php it resets itself to that. Previously i’ve seen I have to accept config.php changes through the admin panel but obviously I can’t do that until I’ve done the update.

    Any ideas?

  • #9 / Dec 12, 2011 2:45pm

    Dan Decker

    7338 posts

    Since you have reposted this issue here, I’m going to close this thread down so that we can focus on getting you a resolution in a timely fashion without splitting our attention amongst duplicate threads.

    Cheers!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases