Below represents the steps taken in my third instance of a failed upgrade. Three unique websites (all on the same server), twice trying 2.1.x to 2.3.1 and once attempting 2.1.x to 2.2.2, all with similar results however this time I wrote everything down.
A note- where I restore from the DB, I mean I drop all the existing tables and import the .sql file I exported just after clearing all the caches.
The EE wizard says “Congratulations! Your server is ready to use ExpressionEngine!”. (Everything is green.)
Using the directories and files from the most recent version of EE I create duplicate directories and files with “_new” appended to the name.
Copy the config and database files, third_party directories etc. from my existing installation; set permissions, revise index files et al for the correct system path.
Upload the duplicate “new” directories and files.
Log in to CP, clear all caches, log in to server, export DB.
Rename the existing files and directories by appending “_old” and then remove “_new” from the new directories and files.
Navigate to CP address (http://www.website.com/masked_system_folder), begin update process.
A Database Error Occurred
Error Number: 1060
Duplicate column name ‘batch_location’
ALTER TABLE `exp_upload_prefs` ADD `batch_location` VARCHAR(255)
Filename: updates/ud_215.php
Line Number: 169
Confirm ‘batch_location’ now exists; restore DB from backup; confirm ‘batch_loaction’ does not exist; comment out
'batch_location' => array(
'type' => 'VARCHAR',
'constraint' => 255,
),from field arrays feeding line 169
$this->EE->dbforge->add_column('upload_prefs', $fields);Restart update process by navigating to CP address.
A Database Error Occurred
Error Number: 1061
Duplicate key name ‘last_activity_idx’
CREATE INDEX last_activity_idx on exp_sessions(last_activity)
Filename: updates/ud_220.php
Line Number: 82
Confirm ‘last_activity_idx’ is index on ‘last_activity’; restore from DB backup; confirm ‘last_activity_idx’ is no longer index on ‘last_activity’; comment out
$this->EE->db->query("CREATE INDEX last_activity_idx on exp_sessions(last_activity)");from line 82
Restart update process by navigating to CP address.
A Database Error Occurred
Error Number: 1146
Table ‘(db name).exp_files’ doesn’t exist
ALTER TABLE `exp_files` ADD `caption` text
Filename: updates/ud_220.php
Line Number: 182
Confirm ‘exp_files’ does not exist: this is the first instance of an error where a “back” button is available, click it, resume update process at “accept license” screen.
A Database Error Occurred
Error Number: 1060
Duplicate column name ‘salt’
ALTER TABLE `exp_members` ADD `salt` VARCHAR(128) DEFAULT ‘’ NOT NULL
Filename: updates/ud_220.php
Line Number: 153
Confirm ‘salt’ exists: another “back” button, click it, resume update process at “accept license” screen, same error.
Restore DB; confirm ‘salt’ does not exist; comment out
$field = array(
'salt' => array(
'type' => 'VARCHAR',
'constraint' => 128,
'default' => '',
'null' => FALSE
)
);from array feeding line 153
$this->EE->dbforge->add_column('members', $field);Click “back” button, resume update process at “accept license” screen.
A Database Error Occurred
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘`password` VARCHAR(128)’ at line 2
ALTER TABLE `exp_members` ADD `password` `password` VARCHAR(128)
Filename: updates/ud_220.php
Line Number: 153
Comment out line 153; click “back” button; resume update process at “accept license” screen.
A Database Error Occurred
Error Number: 1146
Table ‘(db name).exp_files’ doesn’t exist
ALTER TABLE `exp_files` ADD `caption` text
Filename: updates/ud_220.php
Line Number: 182
Confirm ‘exp_files’ doesn’t exist; click “back” button; resume update process at “accept license” screen.
A Database Error Occurred
Error Number: 1060
Duplicate column name ‘remember_me’
ALTER TABLE `exp_members` ADD `remember_me` VARCHAR(32) DEFAULT ‘’ NOT NULL
Filename: updates/ud_220.php
Line Number: 166
Take a chance, click “back” button, resume update process at “accept license” screen: same results.
Confirm ‘remember_me’ exists, comment out
$field = array(
'remember_me' => array(
'type' => 'VARCHAR',
'constraint' => 32,
'default' => '',
'null' => FALSE
)
);
$this->EE->dbforge->add_column('members', $field);from ud_220.php as it follows ‘salt’ above and I assume leaving line 166 ($this->EE->dbforge->add_column(‘members’, $field); ) will produce same results as previous error.
Click “back” button, resume update process at “accept license” screen.
A Database Error Occurred
Error Number: 1146
Table ‘(db name).exp_files’ doesn’t exist
ALTER TABLE `exp_files` ADD `caption` text
Filename: updates/ud_220.php
Line Number: 182
Confirm ‘exp_files’ doesn’t exist; hit “back” button; resume upgrade process at “accept license” screen.
Here I am at a loss- I don’t see anything obvious in what I’ve done that would have removed a function to create ‘exp_files’, but it’s not there. I don’t know what to add or remove so I put everything back as it was before.