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 Errors Occurred when updating from 2.4 to 2.5.1

June 02, 2012 6:20pm

Subscribe [4]
  • #1 / Jun 02, 2012 6:20pm

    MichaelSimone

    76 posts

    A Database Error Occurred
    Error Number: 1054
    Unknown column ‘ref_ip’ in ‘exp_comments’
    ALTER TABLE `exp_comments` CHANGE `ref_ip` `ref_ip` varchar(45)
    Filename: /server_path/system/expressionengine/modules/referrer/upd.referrer.php
    Line Number: 162

    Checking Wiki bug report

     

  • #2 / Jun 04, 2012 2:29pm

    MichaelSimone

    76 posts

    After doing the suggested work around in Wiki to modify the upd.rferrer.php file, Restoring original DB, updating a new admin.php and index.php to reflect name of my system folder then running the installer I NOW GET THIS ERROR…..


    A Database Error Occurred
    Error Number: 1091

    Can’t DROP ‘code’; check that column/key exists

    ALTER TABLE `exp_ip2nation_countries` DROP KEY `code`

    Filename: /home/wincityh/public_html/arp/earp/expressionengine/modules/ip_to_nation/upd.ip_to_nation.php

    Line Number: 182

    This file and column in fact exist…

    EVERY TIME I UPDATE TO ANOTHER VERSION THERE ARE ALWAYS THE SAME TYPE OF PROBLEMS THAT SHOULD HAVE BEEN CAUGHT PRIOR TO THE VERSIONS RELEASE….

  • #3 / Jun 04, 2012 3:39pm

    Shane Eckert

    7174 posts

    Hey MichaelSimone,

    I am sorry that you ran into this bug.

    After fixing the bug, did you treat the update as a failed update?

    If you did, you may need to follow these directions closely for recovering from a failed update.

    Please let me know.

    Cheers,

  • #4 / Jun 04, 2012 4:11pm

    MichaelSimone

    76 posts

    I did all that before and after I ran the install. If you read my post closely you will notice that the table being altered is saying that the ‘code’ column and key do not exist. After checking the db_table this is in fact NOT the case. In fact the key existed in the prior 2.4 version of EE.

    So what do you suggest Now?

     

  • #5 / Jun 05, 2012 10:15am

    Shane Eckert

    7174 posts

    Hi MichaelSimone,

    I understand, that is why I link to the article, just to make sure you dropped the tables because if you do not then you will get errors much like the one you see.

    “So before you attempt another upgrade, completely wipe your existing database clean. If it’s possible, delete the database itself and create a new, empty database. Then restore your database from backup, and try the upgrade again.”

    Where are you now in the update process? Have you rolled back, dropped the tables and moved forward with an update? Is that when you saw this error?

    Thank you,

  • #6 / Jun 05, 2012 10:57pm

    MichaelSimone

    76 posts

    Shane:

    Yes I’ve dropped the tables twice now and rolled backed to not just my last backup but the one before that. Guess what? I get the same resulting error with either one.

    And yes I cleared cache, used fresh admin.php, index.php both with renamed system name,used a new download of EE2.5.1

    This makes no sense! The table, column and key exist in all the database backups I have and the install refuses to recognize this fact. It’s as if it’s looking to upgrade an older version of EE that this column did not exist or was another label.

    This install process has to change. This is the third time now I’ve experienced the same type of problem.

    Michael

  • #7 / Jun 05, 2012 11:29pm

    OwanH

    87 posts

    Hi Michael,

    I’m also sorry to hear you are having this problem. I can understand your frustration with your frequency in having challenges with your EE upgrade processes, however I am curious to know exactly what upgrade process you normally carry out as I usually do not run in to any issues when updating/upgrading my EE sites. I also encountered the issue you reported at the beginning of this thread when I upgraded from 2.4.0 to 2.5.1 but after applying the fix to the upd.referrer.php file and running the update again all went smoothly.

    Aside from this instance I have never experienced any errors when updating my EE sites to a new EE version. In all fairness I have encountered issues after updating such as with some add-ons becoming broken or bugs surfacing from the updated EE system. However I think EE does a good job of keeping these issues down to a minimum considering the size and complexity of the EE CMS. They’re not perfect but I am sure they always try their best to push out quality software for us to use when they issue the updates.

    As I said tho, I am interested in finding out your exact upgrade process. Perhaps I can assist you in ensuring you have a more bullet-proof upgrade process. One thing I always suggest is to clear all caches before an upgrade and to never touch the system/expressionengine/cache folder manually (upgrades never have anything new in the system/expressionengine/cache folder so there is never a need to “replace” your existing cache folder with any cache folder in an upgrade). If you use skype you can add me as a Skype contact and we could probably touch base if you are still encountering issues when upgrading your EE sites. My Skype name is owan.hunte

  • #8 / Jun 11, 2012 12:10pm

    Shane Eckert

    7174 posts

    Hi Michael,

    Where are things now? Did you try and update another time?

    Are you trying to upgrade to 2.5.2?

    Please let me know.

    Cheers,

  • #9 / Jun 22, 2012 7:24am

    outline4

    271 posts

    After doing the suggested work around in Wiki to modify the upd.rferrer.php file, Restoring original DB, updating a new admin.php and index.php to reflect name of my system folder then running the installer I NOW GET THIS ERROR…..

    A Database Error Occurred
    Error Number: 1091

    Can’t DROP ‘code’; check that column/key exists

    ALTER TABLE `exp_ip2nation_countries` DROP KEY `code`

    Filename: /home/wincityh/public_html/arp/earp/expressionengine/modules/ip_to_nation/upd.ip_to_nation.php

    I had the same error… but I didn’t have the first error, since I upgraded from 1.7.3 -> 2.5.2

    I renamed the ip_to_nation folder in the modules folder to “_ip_to_nation” then the installer finished without a problem.

    After that, I renamed the folder to “ip_to_nation” again, deinstalled it (so it doesn’t try to import old values), got a bunch of errors, and then reinstalled it… tataaa… it works…

    just in case anyone has the same troubles.

    the upgrade procedure is absolutely a horrible experience!
    every time there’s almost the same errors!

    - special chars in templates are lost (replaced with “?”)
    - the default settings for Show Smileys / Show Glossary / Show Spellcheck etc are all on “Yes”... (so I have to go and manually change EVERY input field…
    and lot’s of other stuff that takes a lot of energy…

    well… well…
    stefan

     

  • #10 / Jun 25, 2012 10:25am

    Shane Eckert

    7174 posts

    Hey stefan,

    Thank you for your input on this thread. I am sure it will be helpful.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases