Article feedback/Version 5/Technical Design Schema

This page describes the database schema for the Article Feedback Tool Version 5 (AFT V5).

Overview
There are three parts of the schema: tables that describe the type of data that can be expected (in green), tables that hold the feedback itself (in yellow), and tables that track the aggregate data by page or revision (in blue). Greyed-down tables are not currently in use.



Data Type Tables
The data type tables --,  , and   -- describe the fields used by each version of the feedback form.

aft_article_field
Describes each field for each form option. For example, form option #1 has two rows here:  (type  ) and   (type  ). It is used in the submit API call for validation, query building, and building the parameters list.

aft_article_field_option
Describes the options for fields with type. For example, option 2's field  has options ,  ,  , and. It is used in the submit API call for validation.

aft_article_field_group
This table is not currently in use. It would allow you to group fields logically: a set of related checkboxes, for example.

aft_article_feedback
This is the primary table for storing feedback posts. Every valid submit generates a new row here.

aft_article_answer
Keeps track of each answer the user gives per feedback post. For example, if a user answers both parts of form option #1, two rows will be added: one for  and one for.

aft_article_feedback_properties
This table is only ever written to; nothing in the code currently reads from it. On submit, if the user is logged in, it records the number of edits that user has contributed ever, in the last six months , in the last three months , or in the last month. It appears to be derived from legacy AFTv4 code, and I'm not certain why it's been kept.

aft_article_filter_count
Holds the count for each filter type, for each article, and for the central feedback page. Used for the counts displayed with each filter on the special page.

aft_article_feedback_ratings_rollup
Holds the count for each rating, for each article. Used to create the "50% found what they were looking for" notice on the special page.

aft_article_revision_feedback_ratings_rollup
Holds the count for each rating, for each article, for each revision. Is updated on each submit but never used.

aft_article_feedback_select_rollup
Holds the count for each select option, for each article. Is updated on each submit but never used.

aft_article_revision_feedback_select_rollup
Holds the count for each select option, for each article, for each revision. Is updated on each submit but never used.