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.

Duplicate Err Upgrading 1.7 to 2.1.3

April 18, 2011 2:10am

Subscribe [9]
  • #16 / Apr 30, 2011 4:15pm

    Greg Salt

    3988 posts

    Hi Mike,

    I’m sorry that this is taking so long but I think I see the issue now. Can you please run one more query for me to verify the superfluous primary key on the exp_weblog_data table (we’ll deal with one table at a time)?

    show create table exp_weblog_data

    So, you can run altering DB queries on the dev server without fear and can rollback to the working DB if required?

    Cheers

    Greg

  • #17 / Apr 30, 2011 9:30pm

    BrunoBoys

    78 posts

    Thanks Greg, here it is.

    And yes this is a dev server that I can rip in to. :D

  • #18 / May 01, 2011 2:35pm

    Greg Salt

    3988 posts

    Hi Mike,

    Okay, the issue with this table (exp_weblog_data) is that there is a primary key defined (as entry_id).  The keys should be defined at the end of the ‘show create’ output like this:

    KEY `entry_id` (`entry_id`), KEY `weblog_id` (`weblog_id`), KEY `site_id` (`site_id`)

    So, using your DB Query Form run this command:

    ALTER TABLE exp_weblog_data DROP PRIMARY KEY

    Running the ‘show create’ command again should now show the table with three keys as above. If it does then the best thing to do is to make a backup of the DB again so that we don’t to keep repeating commands if we make a mistake with the other two tables. In fact, the other two tables look to have this exact problem as well but it’s best to do one at a time and test the site to make sure that everything works properly.

    Cheers

    Greg

  • #19 / May 01, 2011 6:48pm

    BrunoBoys

    78 posts

    Ok, I’ve ran that statement on all three tables & site seems to be running ok.

    If there is anything in particular I should look for after these changes, please let me know.

    Also, anything else I should check before proceeding with the upgrade?

    Thanks for the help!

  • #20 / May 02, 2011 4:25pm

    Brandon Jones

    5500 posts

    Hi Mike,

    Go ahead and try the upgrade again, and let us know how it goes.

  • #21 / May 10, 2011 3:15pm

    BrunoBoys

    78 posts

    I got the ‘Multiple primary key defined’ error for exp_category_posts as well.
    I’m assuming I should do the same as the other tables?

  • #22 / May 10, 2011 3:57pm

    Brandon Jones

    5500 posts

    Hey Mike,

    Well that’s annoying. I suspect in the short term, yes, that would get you up and running. I’m trying to track down the root of the issue here as well, so can you let me know your MySQL version and whether it is running in Strict mode or not?

  • #23 / May 10, 2011 4:12pm

    BrunoBoys

    78 posts

    mysql is 5.0.77

    I’m looking for strict mode, but i don’t see it. I’m looking on phpinfo, is it in there?

  • #24 / May 10, 2011 5:25pm

    BrunoBoys

    78 posts

    Ok, so it seems every time I fix an error, a new error appears. Here is the latest.

    Error Number: 1062
    
    Duplicate entry '723' for key 1
    
    ALTER TABLE `exp_message_folders` ADD PRIMARY KEY `member_id` (`member_id`)
    
    Filename: updates/ud_200.php
    
    Line Number: 1382
  • #25 / May 11, 2011 11:42am

    Sue Crocker

    26054 posts

    Are there two rows with the same member_id?

    Try:

    select member_id from exp_message_folders where member_id = '723'

    Are there two rows? If so, please delete one.

  • #26 / May 11, 2011 1:27pm

    BrunoBoys

    78 posts

    Thanks Sue, I found a few more too. After cleaning those up, I will attempt again.

    Thank all of you for the support thus far.

  • #27 / May 11, 2011 1:56pm

    Sue Crocker

    26054 posts

    Hopefully that’s all you have to do. Let us know, we’ll be here. We appreciate your patience.

  • #28 / May 12, 2011 1:37am

    BrunoBoys

    78 posts

    Well, I wish I could say it did it, but….ugggghhhhhh

    Error Number: 1054
    
    Unknown column 'can_access_files' in 'exp_member_groups'
    
    ALTER TABLE `exp_member_groups` ADD `can_access_fieldtypes` char(1) NOT NULL DEFAULT 'n' AFTER `can_access_files`
    
    Filename: updates/ud_210.php
    
    Line Number: 56

    There were a few other dups I got rid of, then when I ran the update I got the error above. Since I had tried upgrading multiple times, I recreated the db & double checked file permissions as detailed in the 2.1.3 user guide.

    I looked this new error up in your forums, but I didn’t find a definitive answer.

    Please advise on next steps….

  • #29 / May 12, 2011 5:50am

    John Henry Donovan

    12339 posts

    BrunoBoys,

    The can_access_files column referred to here is added in the updates/ud_200.php LINE 1283

    $Q[] = "ALTER TABLE `exp_member_groups` ADD `can_access_files` CHAR(1) NOT NULL DEFAULT 'n' AFTER `can_access_edit`";

    Can you check your database as it stands for any other columns that were added to exp_member_groups that are mentioned above and below the line above LINES 1282 - 1296

  • #30 / May 26, 2011 1:47am

    BrunoBoys

    78 posts

    Hey John,


    No columns were added that show between lines 1282-1296

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

ExpressionEngine News!

#eecms, #events, #releases