mybb / merge-system

The MyBB Merge System allows for easy merging of an existing forum (be it MyBB or another forum software) into a MyBB 1.8.x forum.
Other
34 stars 34 forks source link

Issue upgrading from SMF 2.0 to MyBB 1.8.37 #299

Open StarredSkies opened 6 months ago

StarredSkies commented 6 months ago

I am upgrading from SMF 2.0 and this appears to be an issue with MyBB 1.8.37. This appeared to be an issue previously but it has come back up.

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1054 - Unknown column 'id_msg' in 'where clause'

SQL Error:
1054 - Unknown column 'a.id_attach' in 'field list'

SQL Error:
1054 - Unknown column 'variable' in 'where clause'

See thread on MyBB community.

How was this resolved in previous versions? I would like to fix this.

StarredSkies commented 6 months ago

Update:

With help from here, I got the first two working. The third, references avatars, does not work.

`SQL Error:

1054 - Unknown column 'a.id_attach' in 'field list'

Query:

SELECT u.id_member, u.avatar, a.id_attach, a.filename, a.file_hash, a.width, a.height FROM smfbb_members u LEFT JOIN PREFIX_attachments a ON (a.id_member=u.id_member AND id_msg=0) WHERE u.avatar != '' OR a.id_attach IS NOT NULL`

The last one "1054 - Unknown column 'a.id_attach' in 'field list'" is not letting me create a column because it has a period within it. I can create 'id_attach' but not "a.id_attach.' Should I push through the process with quotes or do something else? It's also listing two databases, _attachments and _members.

Using this command: [code]ALTER TABLE smfbb_members ADD COLUMN a.id_attach INT NOT NULL;[/code]

What now?

euantorano commented 6 months ago

The a is an alias for the table smfbb_attachments, so try adding the column to that table:

ALTER TABLE smfbb_attachments
ADD COLUMN id_attach INT NOT NULL;