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.

Database Error upgrading 2.3.1 > 2.4

April 13, 2012 1:07pm

Subscribe [2]
  • #1 / Apr 13, 2012 1:07pm

    jeremydouglas

    292 posts

    Hi,

    I’m upgrading from 2.3.1 and I’m getting the below database error.

    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

    I have perused the forums for solutions and have tried:

    • Setting permissions on config.php
    • removing third_party folders in system and themes
    • disabling extensions
    • repairing the database through phpmyadmin
    • The app version was displaying properly in the CP before upgrading.

    I’m running MAMP php 5.3.6

    I’m not sure what else to try. Thanks if anyone can help.

  • #2 / Apr 16, 2012 12:29pm

    Dan Decker

    7338 posts

    Hi Jeremy,

    I’m sorry to see you have run into this error while trying to update!

    The error is the result of the column named being already present in the database. This can happen when artifacts are left from previous update attempts. Although, that’s just one cause.

    When it comes to troubleshooting failed updates, you will need a copy of the database before any update attempts were made. Capturing this backup is the first step outlined in the User Guide, so you should be in good shape there.

    With that backup handy, follow the steps in the Wiki on Troubleshooting Upgrade Errors.

    Once you have the database rolled back, have a look and see if ‘can_search’ already exists in the exp_member_groups table.

    Cheers,

  • #3 / Apr 16, 2012 4:32pm

    jeremydouglas

    292 posts

    Thanks Dan,

    I did do a backup of my DB before running the upgrade, but it seems to also have these artifacts. Perhaps an update was run unsuccessfully in the past.

    Thanks.

  • #4 / Apr 17, 2012 9:17am

    jeremydouglas

    292 posts

    Dan,

    I was thinking about this again. Would not the fact that the installer is starting from the very first update file (ud_009.php) and not ud_240.php as it is supposed to be the cause of the problem?

    There are some features in 2.4 that I would like the client to have. It would be great if I could update the software!

    Thanks.

  • #5 / Apr 17, 2012 4:53pm

    jeremydouglas

    292 posts

    Ok, so I tried copying my config.php and database.php from a fresh install and using that instead. I thought there might be some customization throwing it off.

    EE still thinks I’m upgrading from Public Beta pb01.

    Note: I copied the config.php from a 2.4 install. Not sure where to get a 2.3.1 version.

  • #6 / Apr 19, 2012 12:47pm

    Dan Decker

    7338 posts

    Hi Jeremy,

    Indeed, the installer should not attempt to run the process from “The Beginning”.

    Before you run the update, what is set for $config[‘app_version’] in /system/expressionengine/config/config.php ?

    It should be the version you are currently running ($config[‘app_version’] = ‘231’;. That is what the installer uses to base “the beginning” off of.

    Also, double check that the copies of config.php and database.php that you moved have the correct settings, and that the permissions are set to 666

    I look forward to your reply!

    Cheers,

  • #7 / Apr 19, 2012 1:52pm

    jeremydouglas

    292 posts

    Ok, I could swear I checked the permissions. Working now.

    Thanks!

  • #8 / Apr 20, 2012 3:59pm

    Shane Eckert

    7174 posts

    Hey jeremydouglas,

    No worries. It’s the little things right?

    If you need anything else, please just let us know by opening a new thread.

    Have a great weekend!

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases