ElkArte Community

Project Support => Support => Topic started by: Keiro on November 15, 2017, 07:16:51 pm

Title: Ran upgrade script for Elkarte 1.1...
Post by: Keiro on November 15, 2017, 07:16:51 pm
Got error Unknown column 'gender' in 'field list'

Can I get a fix for this? :p
Title: Re: Ran upgrade script for Elkarte 1.1...
Post by: emanuele on November 17, 2017, 02:14:26 am
Starting from which version of Elkarte are you running the upgrade?
Title: Re: Ran upgrade script for Elkarte 1.1...
Post by: Keiro on November 17, 2017, 05:42:57 am
Oh, uh... sorry for leaving that bit out. Thought I'd included it. It was from version 1.0.9
Title: Re: Ran upgrade script for Elkarte 1.1...
Post by: emanuele on November 17, 2017, 02:08:15 pm
hmm.... not sure how that is possible, maybe it run twice?
Anyway, I guess if the issue is only that one editing the file install/upgrade_1-1.php changing:
Code: [Select]
				'debug_title' => 'Converting gender data',
'function' => function ($db, $db_table)
{
$result = $db->query('', '
to:
Code: [Select]
				'debug_title' => 'Converting gender data',
'function' => function ($db, $db_table)
{
return;
$result = $db->query('', '

this simply skips the step.

BTW, before doing that, try simply renaming the directory "install" to "install_bak" and see how the forum looks like.
Title: Re: Ran upgrade script for Elkarte 1.1...
Post by: emanuele on November 17, 2017, 04:21:48 pm
@Spuds any idea how this is possible? As far as I can see from the upgrade script, we do not even drop the column after the upgrade... O_O
The only way I see not to have the gender column is to be running the upgrade on a 1.1 clean install.
Title: Re: Ran upgrade script for Elkarte 1.1...
Post by: Spuds on November 17, 2017, 05:31:52 pm
Was there a problem along the way of upgrading from SMF and not having that column ... or was that another column that was missing?  Just wondering if it was an SMF->ElkArte at some point.  Other than that, unless it was manually removed I don't see how it could be missing from 1.0.x
Title: Re: Ran upgrade script for Elkarte 1.1...
Post by: Keiro on November 17, 2017, 08:28:08 pm
Quote from: Spuds – Was there a problem along the way of upgrading from SMF and not having that column ... or was that another column that was missing?  Just wondering if it was an SMF->ElkArte at some point.  Other than that, unless it was manually removed I don't see how it could be missing from 1.0.x

Nope, no SMF->Elkarte migration.

Error popped, as follows:

Code: [Select]
Error! 
Error retrieving information on step: Adding new custom field columns (Item: 14)

This is how far it got:

Code: [Select]
Adding new tables for notifications...done
Update mention logs...done
Splitting email_id into it's components in postby_emails...done
Converting IP columns to varchar instead of int...done
Adding new custom field columns...done
failed

Location data and personal text also caused the same issue. Simply repeated the suggested edits here and I was able to successfully upgrade.
Title: Re: Ran upgrade script for Elkarte 1.1...
Post by: emanuele on November 18, 2017, 06:57:45 pm
I just pushed to github a new upgrade with some more checks, I forgot to post it here... I'll do it tomorrow morning 1st thing!
Title: Re: Ran upgrade script for Elkarte 1.1...
Post by: emanuele on November 20, 2017, 06:38:36 pm
If I didn't forgot to mark the topic unread...
Here it is the file and sorry for the late reply. :-[
Title: Re: Ran upgrade script for Elkarte 1.1...
Post by: emanuele on November 20, 2017, 06:38:55 pm
Ops... but in the upload system... darn!
Title: Re: Ran upgrade script for Elkarte 1.1...
Post by: Keiro on November 20, 2017, 06:40:18 pm
*shakes his head at @emanuele *
Title: Re: Ran upgrade script for Elkarte 1.1...
Post by: emanuele on November 20, 2017, 06:47:28 pm
Okay, the file is up in the above reply:
https://www.elkarte.net/community/index.php?topic=4764.msg34599#msg34599