MyBB Community Forums

Full Version: Upgrade error 1.8.3 - 1.8.4 (WITH upgrade script)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I have a Postgres-based MyBB installation (PostgreSQL v. 9.3.6). When upgrading the forum (USING the upgrade script) from 1.8.3 to 1.8.4 I got an error message:

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
   42601 - ERROR: syntax error at or near "2" LINE 1: ALTER TABLE mybb_adminoptions ADD 2fasecret varchar(16) NOT ... ^
Query:
   ALTER TABLE mybb_adminoptions ADD 2fasecret varchar(16) NOT NULL default ''


Looking into server logs I found the full error message:
2015-03-12 20:29:47 CET ERROR:  syntax error at or near "2" at character 35
2015-03-12 20:29:47 CET STATEMENT:  ALTER TABLE mybb_adminoptions ADD 2fasecret varchar(16) NOT NULL default '

Has anybody experienced this behavior on Postgres-based installations? Is it really a syntax error in the upgrade script?

Thank you in advance.
This is a known issue that will be fixed with the next release. Unfortunately PgSQL hasn't been tested as thoroughly it should have.
So, it is the compatibility issue. Thank you, Stefan, for the instant answer.

It would be good if you, developers, paid a bit more attention to the needs of the minority (I guess) - not "My..." users of the great "MyBB" product.

Therefore, reverting and looking forward to the next release. Thanks again.
Generally we're pretty good about testing across different database servers. Unfortunately, it looks like this one slipped through. We understand your frustration and never intend to neglect minority users.

MySQL just happens to be the most prominent, so it gets a lot of love. Smile
Uh, oh, let's keep away from comparisons of MySQL and PgSQL, just in case Smile

If you wish I can give a few more examples of glitches in MyBB that should be gone from the point of view of "my minority" of users. Is there a subforum here for postgres users' problems?
You can report PgSQL issues just like any other bug: http://community.mybb.com/forum-157.html
I'm using PgSQL (postgresql) also, and I've had to manually patch problems in the scripts, so I waited to upgrade and now I'm encountering this same problem when trying to upgrade from 1.6.9.
"Alter [table] alter column type xyz not null" is not valid syntax.
As far as I know,
This: "ALTER TABLE emsf_polls ALTER COLUMN numvotes TYPE text NOT NULL;"
Has to be broken into 2 parts:
ALTER TABLE emsf_polls ALTER COLUMN numvotes TYPE text;
ALTER TABLE emsf_polls ALTER COLUMN numvotes SET NOT NULL;

I really wish you'd put caveats in the upgrade instructions. I just backed up everything, replaced all of the forum files, and spent another hour reading through scripts to see if I could implement an easy fix. Now I have to put it all back the way it was and do this again, someday ... or not.

(edit: I should add that I'm trying to upgrade to 1.8.6 using the latest download)