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.

DB errors in upgrading from 2.31 to 2.4 - iptonation and exp_file_watermarks

March 12, 2012 10:26pm

Subscribe [2]
  • #1 / Mar 12, 2012 10:26pm

    dreas

    61 posts

    This question may be related to a resolved thread.
    And resolved thread.
    And resolved thread 211658.

    Hi All,

    I attempted an upgrade to 2.4 over the weekend and had it fail with the same multiple db errors seen in thread 211658 above.
    I made multiple attempts to step through the install with manual db changes to exp_files, exp_file_watermarks and exp_ip2nation_countries tables. I’d get all changes ok in exp_files and exp_file_watermarks but exp_ip2nation_countries would then fail again.

    Finally I reverted back to 2.3.1 and the original functioning database.

    However when I reverted to 2.3.1 I checked on the ip2nations module, clicked on the “show module” link on “IP to Nation” text and then got the same errors I saw in the upgrade.

    Can’t DROP ‘code’; check that column/key exists
    
    ALTER TABLE `exp_ip2nation_countries` DROP KEY `code`
    
    Filename: /var/clients/client4/web3/web/system/expressionengine/modules/ip_to_nation/upd.ip_to_nation.php

    Which leads me to believe that the upgrade _may_ have failed because the iptonation db tables were already corrupt. (possibly thru a previous upgrade?)
    I then uninstalled and reinstalled the IP to Nation module and the module now works fine under 2.3.1 and the tables look ok in db.

    I’m (understandably ) a little gun shy on redoing the update as it burnt hours of my time stepping through errors and the manual db changes.
    If only i’d seen resolved thread 211658 before my adventure!

    Which brings me to my question, what other steps should I take to ensure a seamless upgrade?
    I note that Willem solved his update problem by - in part - deleting the IP to nation module & tables.
    I’m not sure if I need to do this as well since the errors in 2.3.1 are gone.
    I’ve turned off extensions. What other add-ons, modules and fieldtypes(?) should i turn off?
    Given the errors encountered what else should I be watching for?

    pls advise

    thx!


    //Andreas


    tech deets
    Plesk Linux server running Apache/2.2.3 (CentOS), PHP 5.1.6 and MySQL 5.0.45

    MSM active (I have downloaded correct updates to this for 2.4 compatibility )

    (And yes i did read the guide. 3 times at least.
    And I also went through the troubleshooting guide on the wiki. )

  • #2 / Mar 13, 2012 1:49pm

    Shane Eckert

    7174 posts

    Hello dreas,

    I am sorry to hear you are running into this update issue.

    I believe that you should be able to update without a hitch if everything is working. If you want to be safe and remove any Add-Ons that you are not using or that may not be compatible post update, that is good.

    A lot of the posts you mention ran into issues because of fragments left from failed updates. Having read the wiki on going through the process of recovering from a failed update, you are a lot more prepared.

    Do you have a dev environment that you can test in first? That would be handy, just because each setup can be so different. Working through the bugs first before attempting the update on the live server might save you some time and some headache. Is this something you can do?

    Please let me know if there are more questions that I can answer.

    Thank you,

  • #3 / Mar 13, 2012 3:18pm

    dreas

    61 posts

    Thanks Shane,

    We do have a local dev environment but the underlying LAMP stack is currently out of version synch with server.
    So great for checking/previewing templates and snippet code, but not great for testing environment/install itself.
    They are out of synch because updated the Plesk Linux server to run Apache/2.2.3 (CentOS), PHP 5.3.10 and MySQL 5.5.21.

    I’ll reduce the Add-ons to minimum uninstalling 3rd party as well as IP to Nation.
    And I’ll start from a clean database bkup without IPtoNation tables

    can’t believe I’m gonna do this again… sigh

  • #4 / Mar 13, 2012 5:49pm

    Shane Eckert

    7174 posts

    Hey dreas,

    Is there anyway you can get a dev environment setup for this? Some kinds of staging server, anything to test out major changes before going live? It’s so worth it. Maybe even a VM using something free like VMware player and a LAMP VM?

    The first sign of trouble, please stop and post here. We can help you.

    Cheers,

  • #5 / Mar 14, 2012 4:59pm

    dreas

    61 posts

    Removing the IPtoNation module/tables fixed the install.

    no errors thrown at all on upgrade once this factored out.
    2.31 copy of the IPtoNation DB table may have been corrupted. or update code may have error.

    All looked good until I tried to edit existing post. And then I got the error described here:
    http://ellislab.com/forums/viewthread/210272/
    The fix worked for me as well.

    stepping through the rest now.

  • #6 / Mar 15, 2012 5:31pm

    Dan Decker

    7338 posts

    Hi dreas,

    I’m glad to see you are on the path to a successful update!

    We’ll leave this open a bit longer in case you run into any other trouble.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases