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.

Upgrading from 1.6.8 to 2.4.0

March 14, 2012 8:31am

Subscribe [2]
  • #1 / Mar 14, 2012 8:31am

    Luke Hardiman

    109 posts

    This question may be related to a resolved thread.

    Hi I’m getting many db errors - have done when I’ve attempted every 1 -2 upgrade, including this error from the related thread when upgrading to 2.0 :

    A Database Error Occurred
    Error Number: 1062
    
    Duplicate entry '582' for key 'PRIMARY'
    
    ALTER TABLE `exp_weblog_data` ADD PRIMARY KEY `entry_id` (`entry_id`)
    
    Filename: updates/ud_200.php
    
    Line Number: 1700

    What I really need to know is, is it still recommended or necessary to upgrade to the latest 1.7.x version before tackling the 2.x upgrade?

    As far as I can see this no longer appears in the upgrade instructions so I have assumed it is no longer necessary or recommended.

  • #2 / Mar 14, 2012 8:37am

    Luke Hardiman

    109 posts

    I can confirm I have managed to work around all the other duplicate table / column errors by running

    DROP TABLE 
    exp_snippets,
    exp_layout_publish,
    exp_accessories,
    exp_cp_search_index,
    exp_channel_entries_autosave

    on my 1.6.8 db prior to running the upgrade script.

    So the error I’m stuck on is the primary key error quoted above.

    Do you guys have any idea how I might have come to already have these primary keys?

    Any idea whether I can comment out these lines in the update script?

  • #3 / Mar 15, 2012 11:55am

    Shane Eckert

    7174 posts

    Hello Luke,

    I am sorry to hear you are running into this problem.

    This duplicates that you are seeing in your database are from past failed updates. We call them artifacts. 😊

    Can you check your config.php file and tell me what version the config file says you are right now?

    You may need to follow these directions on Troubleshooting Upgrade Errors. One of the steps before retrying the update is to drop all of the tables so that there is nothing left behind that might cause duplicate errors and such.

    Again, sorry that you have run into this. Let me know what version you are at now and we can go from there.

    Cheers,

  • #4 / Mar 16, 2012 1:52am

    Luke Hardiman

    109 posts

    Hi Shane, yes it looks like someone has tried to upgrade this install before I got to it.

    I have already made a note of which tables to drop before beginning the process.

    How do I work around the primary key error? The troubleshooting guide doesn’t address this. I cannot revert to a database without primary keys as this one has been in use for some time and somehow made it’s way to the production environment (!).

    I am a bit of a mysql dummy. Is there a way to remove the primary keys for the exp_weblog_data table and any others that have primary keys where the upgrade script expects that they will not?

  • #5 / Mar 18, 2012 1:08pm

    Dan Decker

    7338 posts

    Hi Luke,

    If we take a look at that error and dig in a bit, it appears to state that there is a duplicate “582” under entry_id.

    Before you try the update, go into exp_weblog_data and look for 2 “582” entries.

    Let me know the results.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases