Page MenuHomePhabricator

trash and redo ArticleFeedbackv5 on beta enwiki
Closed, ResolvedPublic

Description

The ArticleFeedbackV5 extensions received several database changes which were not applied on the beta wiki.

http://en.wikipedia.beta.wmflabs.org/wiki/Special:ArticleFeedbackv5

Error: 1054 Unknown column 'af_net_helpfulness' in 'field list' (deployment-sql)

Chris is going to need a fresh instance on enwiki beta so we need to deleted the aft tables and reinstall the extension tables properly.


Version: unspecified
Severity: normal

Details

Reference
bz38422

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 1:13 AM
bzimport set Reference to bz38422.

I have renamed the existing aft_article_% and article_feedback% tables with the '_back' prefix.

(mw@deployment-sql) [enwiki]> show tables like 'aft%';
+---------------------------------------------------+

Tables_in_enwiki (aft%)

+---------------------------------------------------+

aft_article_answer_back
aft_article_answer_text_back
aft_article_feedback_back
aft_article_feedback_properties_back
aft_article_feedback_ratings_rollup_back
aft_article_feedback_select_rollup_back
aft_article_field_back
aft_article_field_group_back
aft_article_field_option_back
aft_article_filter_count_back
aft_article_revision_feedback_ratings_rollup_back
aft_article_revision_feedback_select_rollup_back

+---------------------------------------------------+
12 rows in set (0.00 sec)

(mw@deployment-sql) [enwiki]> show tables like 'article%';
+-----------------------------------+

Tables_in_enwiki (article%)

+-----------------------------------+

article_feedback_back
article_feedback_pages_back
article_feedback_properties_back
article_feedback_revisions_back
article_feedback_stats_back
article_feedback_stats_types_back

+-----------------------------------+
6 rows in set (0.00 sec)

(mw@deployment-sql) [enwiki]>

When running the installer with:

mwscript update.php --wiki=enwiki --quick
MediaWiki 1.20alpha Updater

I get the following error:

Creating article_feedback table...done.
...article_feedback table already exists.
...index aa_page_id already set on article_feedback table.
...have aa_design_bucket field in article_feedback table.
...have afp_value_text field in article_feedback_properties table.
...article_feedback_properties table already exists.
...article_feedback_revisions table already exists.
...article_feedback_stats_types table already exists.
...article_feedback_stats table already exists.
...index article_feedback_timestamp already set on article_feedback table.
...index aa_page_user_token already set on article_feedback table.
...aa_user_page_revision key doesn't exist.
...article_feedback table already exists.
Creating aft_article_answer_text table...A database query syntax error has occurred.
The last attempted database query was:
"ALTER TABLE aft_article_answer
ADD COLUMN aat_id integer unsigned NULL AFTER aa_response_text
"
from within function "DatabaseBase::sourceFile( /usr/local/apache/common-local/php-master/extensions/ArticleFeedbackv5/sql/offload_large_feedback.sql )".
Database returned error "1146: Table 'enwiki.aft_article_answer' doesn't exist (deployment-sql)"

So the aft_article_answer table is not created for some reason. Only the aft_article_answer_text table is created.

Table cleaning is done with:

DROP TABLE article_feedback;
DROP TABLE article_feedback_pages;
DROP TABLE article_feedback_properties;
DROP TABLE article_feedback_revisions;
DROP TABLE article_feedback_stats ;
DROP TABLE article_feedback_types ;
DROP TABLE article_feedback_stats_types;
DROP TABLE aft_article_answer_text ;

I had to tweak ArticleFeedbackv5 extension:

https://gerrit.wikimedia.org/r/#/c/15731/ fix install on SQLite
https://gerrit.wikimedia.org/r/#/c/15734/ fix DB install when ArticleFeedback is already there

Deployed 15734 on beta as a live hack.

The special page seems to be working again. Assuming fixed.

http://en.wikipedia.beta.wmflabs.org/wiki/Special:ArticleFeedbackv5