Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
569 views
in Q2A Core by
I'm now trying to upgrade from v1.3 to v1.4 but facing an error. Any body has same problem?

I downloaded v1.4 and ran scripts to upgrade database but the following error has coming out:

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

6 upgrade step/s remaining...

Running query: ALTER TABLE qa_blobs ADD COLUMN filename VARCHAR(255), ADD COLUMN userid INT UNSIGNED, ADD COLUMN cookieid BIGINT UNSIGNED, ADD COLUMN createip INT UNSIGNED, ADD COLUMN created DATETIME ...

Warning: Cannot modify header information - headers already sent by (output started at C:\webpub\qa4\qa-include\qa-db-install.php:1012) in C:\webpub\qa4\qa-include\qa-install.php on line 60

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

ALTER TABLE qa_blobs ADD COLUMN filename VARCHAR(255), ADD COLUMN userid INT UNSIGNED, ADD COLUMN cookieid BIGINT UNSIGNED, ADD COLUMN createip INT UNSIGNED, ADD COLUMN created DATETIME

Error 1060: Duplicate column name 'filename'
by
For further information:
I copy v.14 to another directory named qa4 and change qa-config.php to point to the existing database of v1.3. Then i run localhost/qa4

1 Answer

+1 vote
by

For some reason, your qa_blobs table already has a column named filename. I've no idea how this happened, unless you were experimenting at some point with one of the nightly builds. Anyway, the solution is to either drop the column from your database, or comment out the line in qa-db-install.php which begins with:

qa_db_upgrade_query('ALTER TABLE ^blobs ADD COLUMN filename

In general, this approach should work with any database upgrade step which has already been performed, but not recorded as such by Q2A.

by
I got it. Thank you!
asked May 26, 2011 in Q2A Core by Lost qa-page-home in V1.4?
...