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

Running query: LOCK TABLES qa_categories WRITE, qa_contentwords WRITE, qa_cookies WRITE, qa_iplimits WRITE, qa_options WRITE, qa_pages WRITE, qa_posts WRITE, qa_posttags WRITE, qa_titlewords WRITE, qa_userlimits WRITE, qa_userpoints WRITE, qa_userprofile WRITE, qa_users WRITE, qa_uservotes WRITE, qa_words WRITE ...

6 upgrade step/s remaining...

Running query: ALTER TABLE qa_posts CHANGE COLUMN format format VARCHAR(20) CHARACTER SET ascii NOT NULL DEFAULT '' ...

Running query: LOCK TABLES qa_categories WRITE, qa_contentwords WRITE, qa_cookies WRITE, qa_iplimits WRITE, qa_options WRITE, qa_pages WRITE, qa_posts WRITE, qa_posttags WRITE, qa_titlewords WRITE, qa_userlimits WRITE, qa_userpoints WRITE, qa_userprofile WRITE, qa_users WRITE, qa_uservotes WRITE, qa_words WRITE ...

5 upgrade step/s remaining...

Running query: ALTER TABLE qa_posts ADD KEY updated (updated, type), ADD KEY categoryid_2 (categoryid, updated, type) ...

Running query: LOCK TABLES qa_categories WRITE, qa_contentwords WRITE, qa_cookies WRITE, qa_iplimits WRITE, qa_options WRITE, qa_pages WRITE, qa_posts WRITE, qa_posttags WRITE, qa_titlewords WRITE, qa_userlimits WRITE, qa_userpoints WRITE, qa_userprofile WRITE, qa_users WRITE, qa_uservotes WRITE, qa_words WRITE ...

4 upgrade step/s remaining...

Running query: ALTER TABLE qa_posts ADD COLUMN lastip INT UNSIGNED, ADD KEY lastip (lastip, updated, type) ...

Running query: LOCK TABLES qa_categories WRITE, qa_contentwords WRITE, qa_cookies WRITE, qa_iplimits WRITE, qa_options WRITE, qa_pages WRITE, qa_posts WRITE, qa_posttags WRITE, qa_titlewords WRITE, qa_userlimits WRITE, qa_userpoints WRITE, qa_userprofile WRITE, qa_users WRITE, qa_uservotes WRITE, qa_words WRITE ...

3 upgrade step/s remaining...

Running query: ALTER TABLE qa_users ADD COLUMN avatarblobid BIGINT UNSIGNED, ADD COLUMN avatarwidth SMALLINT UNSIGNED, ADD COLUMN avatarheight SMALLINT UNSIGNED ...

Running query: CREATE TABLE qa_blobs (blobid BIGINT UNSIGNED NOT NULL, format VARCHAR(20) CHARACTER SET ascii NOT NULL, content MEDIUMBLOB NOT NULL, PRIMARY KEY (blobid)) ENGINE=InnoDB CHARSET=utf8 ...

Running query: CREATE TABLE qa_cache (type CHAR(8) CHARACTER SET ascii NOT NULL, cacheid BIGINT UNSIGNED DEFAULT 0, content MEDIUMBLOB NOT NULL, created DATETIME NOT NULL, lastread DATETIME NOT NULL, PRIMARY KEY (type,cacheid), KEY (lastread)) ENGINE=InnoDB CHARSET=utf8 ...

Running query: LOCK TABLES qa_categories WRITE, qa_contentwords WRITE, qa_cookies WRITE, qa_iplimits WRITE, qa_options WRITE, qa_pages WRITE, qa_posts WRITE, qa_posttags WRITE, qa_titlewords WRITE, qa_userlimits WRITE, qa_userpoints WRITE, qa_userprofile WRITE, qa_users WRITE, qa_uservotes WRITE, qa_words WRITE, qa_blobs WRITE, qa_cache WRITE ...

2 upgrade step/s remaining...

Running query: 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 ...


Warning: Cannot modify header information - headers already sent by (output started at /home/aumnik/public_html/test/qa-include/qa-db-install.php:839) in /home/aumnik/public_html/test/qa-include/qa-install.php on line 60
body, input { font-size: 16px; font-family: Verdana,Arial,Helvetica,sans-serif; }body { text-align: center; width: 640px; margin: 64px auto; }table { margin: 16px auto; }

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 './aumnik_test/qa_userlogins.frm' (errno: 150)

 

P.S. User - ALL PRIVILEGES!!!

by
I just upgraded one of my site from Q2A 1.2.1 to 1.3 beta version with no issues.
by
I congratulate!

1 Answer

+1 vote
by
Is it possible that you converted one of the other tables from InnoDB to MyISAM? That would make it a problem to use the foreign key in the qa_userlogins table.
by
edited by
I just upgraded to 1.3
Has pushed:
Your Question2Answer database needs to be upgraded for this version of the software.
==>"Upgrade Database"


P.S. sorry for the bad English
by
"...Is it possible that you converted one of the other tables from InnoDB to MyISAM?.."

yes((
http://s014.radikal.ru/i327/1011/d6/52a50ce1445d.jpg
How to correct?
by
Assuming you want to stay with MyISAM, you can just change Q2A so it doesn't add a foreign key in the qa_userlogins table. Comment out this line in qa-db-install.php:

$tables['userlogins'][]='CONSTRAINT ^userlogins_ibfk_1 '.$userforeignkey.' ON DELETE CASCADE';
by
just change InnoDB to MyISAM in qa-include/db/install.php for working very well !
...