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.

EE2.1.4 > 2.2 update error Duplicate key name 'last_activity_idx'

June 22, 2011 2:48pm

Subscribe [11]
  • #16 / Jun 24, 2011 6:46am

    Lyubov Berezina

    42 posts

    Not sure if this will help, but its worth checking as this worked for me:

    I had an existing 2.1.3 install.

    The following tables existed in my 2.1.3 install MySQL database:

    exp_files
    exp_files_categories
    exp_files_dimensions
    exp_files_watermarks

    These tables *** do not *** exist in another 2.1.3 install I have for another site.

    I actually deleted these tables and started the upgrade process from scratch and it worked!!! No Database errors!

    Disclaimer: I’m not saying this will work for everyone. But it worked for me.
    If you try it don’t forget to back-up your MySQL database before-hand! 😊

    Not working for me though I had these tables :(
    Thanks anyway for your advice!

  • #17 / Jun 24, 2011 8:06am

    karlosb

    43 posts

    Just to double check:

    You do have to make sure everything has been restored to original state:
    ie. index.php / themes / system / MySQL database

    And then delete from MySQL database:

    exp_files
    exp_files_categories
    exp_files_dimensions
    exp_files_watermarks

    And then upload new 2.2.0 install and perform upgrade as per EE docs.

  • #18 / Jun 25, 2011 1:31pm

    Ryan Essmaker

    14 posts

    Not sure if this will help, but its worth checking as this worked for me:

    I had an existing 2.1.3 install.

    The following tables existed in my 2.1.3 install MySQL database:

    exp_files
    exp_files_categories
    exp_files_dimensions
    exp_files_watermarks

    These tables *** do not *** exist in another 2.1.3 install I have for another site.

    I actually deleted these tables and started the upgrade process from scratch and it worked!!! No Database errors!

    Disclaimer: I’m not saying this will work for everyone. But it worked for me.
    If you try it don’t forget to back-up your MySQL database before-hand! 😊

    I do believe it has something to do with these tables. Had the same issue and I think it’s connected to either the Structure or Matrix add-ons.

    Prior to upgrading EE from 2.1.3 to 2.2, I updated both Structure and Matrix to their recent EE 2.2 compatible releases. During the EE updating process I received the same error as those above. So I reverted to the database backup I had prior to upgrading the add-ons and it did not contain the “exp_files…” tables. Reverted to my backed up EE files and made sure the site worked correctly. Ran the EE updater again without upgrading the add-ons and everything went smoothly. Updated the mentioned add-ons afterward and there are no problems to report.

    Hope this helps.

  • #19 / Jun 28, 2011 10:03am

    Sue Crocker

    26054 posts

    OK, taking roll call—

    Rob - you re-installed, so you’re OK?
    Bransin - you appear to be OK..
    Lyubov Berezina - what about you?
    karlorb - you posted a solution, so assuming you’re OK
    Ryan Essmaker - you appear to be OK too after upgrading your Structure and Matrix add-ons *after* updating

  • #20 / Jun 28, 2011 12:07pm

    Ryan Essmaker

    14 posts

    Ryan Essmaker - you appear to be OK too after upgrading your Structure and Matrix add-ons *after* updating

    Correct.

  • #21 / Jun 28, 2011 12:24pm

    Lyubov Berezina

    42 posts

    OK, taking roll call—

    Lyubov Berezina - what about you?

    This is actually strange.

    I removed the mentioned tables (http://ellislab.com/forums/viewreply/907476/) from my database. It did not help at all. Then I decided to start fresh & clean install. I imported my DB back-up into my MySQL DB (this backup contained the 2.1.3 tables structure with the DROP TABLE instructions) and I was going to re-upload the files backup but then I accidentally reloaded the webpage with the error and - magic! - I was told I was running the updated 2.2 version.
    So now I have:
    2.1.3 DB
    2.2 files on server
    2.2 version in the CP.

    I don’t know how it’s posiible and what other mistakes can I get while using old DB with new files. I would highly appreciate any help from someone who can login into my CP and check if everything is OK.

    Thanks!

  • #22 / Jun 29, 2011 5:58pm

    Kevin Smith

    4784 posts

    Glad to see that you’re all set, Ryan.

    Lyubov, if your config.php file says you’re running 2.2, that’s the version the whole system will think you’re running. That config line is the master reference for the version number. Even if your database is from your 2.1.3 install, the system will think it’s on 2.2. Make sure you roll back your entire system to a fully working 2.1.3 state before trying the upgrade again taking note of the tables that shouldn’t be in the DB. I know it’s a pain, but doing it half-way only creates more issues.

  • #23 / Jan 03, 2012 8:25am

    Mark Croxton

    319 posts

    Just got this error when upgrading from 2.14 > 2.3.1.

    It is clearly caused by the installer running the same update file twice: I checked the changes made by the file the error occurred in and they had all been made.

    Therefore, to continue with the upgrade simply open the file where the error occurred, comment out the upgrade methods in the do_update() function (it should simply return TRUE) and refresh your browser.

    Eg, in ud_220.php:

    public function do_update()
     {
      $this->EE->load->dbforge();
      
      #$this->_update_session_table();
    
      #$this->_update_password_lockout_table();
      
      #$this->_update_members_table();
      
      #$this->_update_files_table();
    
      #$this->_update_comments_table();
    
      #$this->_update_template_groups();
    
      #$this->_alter_sidebar_deft();
    
      return TRUE;
     }

    I encountered a further two errors like this and each time fixed as above.

  • #24 / Jan 03, 2012 7:54pm

    Sean C. Smith

    3818 posts

    Mark,

    Thanks for posting your solution - I’m sure this will be beneficial to other users in the future.

    Sean

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

ExpressionEngine News!

#eecms, #events, #releases