Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
  • Register
Welcome to the Q&A for Question2Answer.

If you have questions about the platform, click here to ask and please use English.

If you just want to try Q2A, please use the demo, which also grants admin access.

Apr 29: Q2A 1.5.2

Database Upgrade Error

+2 votes

 

All I did was upload and overwrite the QA files, then visited my website and clicked upgrade database.

Question2Answer was unable to perform the installation query below. Please check the user in the config file has CREATE and ALTER permissions:

CREATE TABLE qa_userlogins (userid INT UNSIGNED NOT NULL, source VARCHAR (16) CHARACTER SET ascii NOT NULL, identifier VARBINARY (1024) NOT NULL, identifiermd5 BINARY (16) NOT NULL, KEY source (source, identifiermd5), KEY userid (userid), CONSTRAINT qa_userlogins_ibfk_1 FOREIGN KEY (userid) REFERENCES qa_users(userid) ON DELETE CASCADE) ENGINE=InnoDB CHARSET=utf8

Error 1005: Can't create table 'helpover_flow.qa_userlogins' (errno: 150)

asked Nov 4, 2010 in Q2A Core by Bobby

1 Answer

0 votes

If you've changed some of your Q2A tables from InnoDB to MyISAM, please see this answer for an explanation and solution.

answered Nov 4, 2010 by gidgreen
I have not touched anything in my MySQL tables since the first installation, so I have no idea how this could have changed
OK, it's worth checking if your tables are MyISAM or InnoDB via MySQL's interface, but in any event, you can probably solve this by commenting out this line in qa-db-install.php:

$tables['userlogins'][]='CONSTRAINT ^userlogins_ibfk_1 '.$userforeignkey.' ON DELETE CASCADE';