MyBB Community Forums

Full Version: need SQL help with upgrade error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm running an upgrade from V 1.6.1. Yep, I procrastinated.

I'm at the stage where all the 'Upload' files have been overwritten, I'm at my (example.com/install/upgrade.php) Upgrade Process "Welcome" page, select my ooooold version 1.6.1 from the pulldown, click NEXT and get the following:
------------------------------------------------------
Repairing Database Sequences

Performing necessary upgrade queries...
MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
    1060 - Duplicate column name 'custom_profile_fields'
Query:
    ALTER TABLE mybb_adminviews ADD custom_profile_fields text NOT NULL AFTER conditions
------------------------------------------------------

Okay, so I go to my database in cPanel, I locate 'mybb_adminviews' and the 'custom_profile_field' column...but I see no duplicate of that column name.
And I haven't a clue how to alter the table by executing a "ADD custom_profile_fields text NOT NULL AFTER conditions"

Could anyone please advise?
(obviously, I've never done all this before!)
The script in Upgrade20.php is the only place that specific ALTER TABLE query appears.

If you see a column already in the mybb_adminviews table named custom_profile_field, then it suggests Upgrade20 has already been done.

Upgrade20 is labeled for 1.6.3, so that means either 1.6.1 was not your version level, or the script was completed but the upgrade was stopped due to some other error.

I'm hoping you have made database backup before you started the upgrade process in case you have to revert.

In this case, start the upgrade again, but indicate you're upgrading from 1.6.4 which should be the next step in the process.
HLF, thanks so much; you were right in that progressing from 1.6.4 did indeed do the job.

I will note, though - and this should be noted in the upgrade docs - that there is a trick here:
selecting 1.6.4 as per your suggestion did take at least take me to a non-error page
Updating Database

Performing necessary upgrade queries...

Click next to continue with the upgrade process.

And then the 'next' button does...nothing. Patiently waited an hour, as the instructions sternly warned not to double-click anything.
Tried it again at that point, but again - nothing.
Then, like any frustrated idiot, I hammered at the 'Next' button - and eureka, the process eventually moved forward!

Later in the long sequence, I encountered the same message as above, and once again hammered at the Next button and moved forward.
So I believe these may all be different stages in the "performing necessary upgrade queries.." operations, but the message panels all look the same so it appears that NOTHING IS HAPPENING.

Maybe I'm wrong about this. But if not, it seems like a trap for those of us who are told not to double-click...and follow instructions.

Anyway, I thank you once again for your insight!
I'm now off to tweak a LOT of settings back to 'normal'...but at least the upgrade has been completed and the forum messages are intact!