Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
1.4k views
in Q2A Core by

 

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)

1 Answer

+1 vote
by

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

by
I have not touched anything in my MySQL tables since the first installation, so I have no idea how this could have changed
by
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';
...