1,107
edits
Line 47: | Line 47: | ||
== Database Schema == | == Database Schema == | ||
=== Old TikiWiki schema === | |||
We subverted the TikiWiki poll mechanism to implement feedback. The existing data and schema is as follows. | |||
mysql> describe tiki_polls; | |||
+-----------------------+--------------+------+-----+---------+----------------+ | |||
| Field | Type | Null | Key | Default | Extra | | |||
+-----------------------+--------------+------+-----+---------+----------------+ | |||
| pollId | int(8) | | PRI | NULL | auto_increment | | |||
| title | varchar(200) | YES | | NULL | | | |||
| votes | int(8) | YES | | NULL | | | |||
| active | char(1) | YES | | NULL | | | |||
| publishDate | int(14) | YES | | NULL | | | |||
| voteConsiderationSpan | int(4) | | | 60 | | | |||
| pollQuestionId | int(8) | | | 0 | | | |||
| is_feedback | tinyint(2) | | | 0 | | | |||
+-----------------------+--------------+------+-----+---------+----------------+ | |||
If is_feedback is set to 1, then this is a feedback question. | |||
mysql> describe tiki_poll_questions; | |||
+-------------------+--------------+------+-----+---------+----------------+ | |||
| Field | Type | Null | Key | Default | Extra | | |||
+-------------------+--------------+------+-----+---------+----------------+ | |||
| pollQuestionId | int(8) | | PRI | NULL | auto_increment | | |||
| pollQuestionName | varchar(200) | YES | | NULL | | | |||
| pollQuestionTitle | varchar(200) | YES | | NULL | | | |||
| position | int(4) | | | 0 | | | |||
| layoutType | char(1) | YES | | | | | |||
+-------------------+--------------+------+-----+---------+----------------+ | |||
Each tuple represents a question, e.g.: | |||
mysql> select * from tiki_poll_questions; | |||
+----------------+-------------------------+-------------------------------------------------------------------------------------------------------------------------------+----------+------------+ | |||
| pollQuestionId | pollQuestionName | pollQuestionTitle | position | layoutType | | |||
+----------------+-------------------------+-------------------------------------------------------------------------------------------------------------------------------+----------+------------+ | |||
| 1 | kb_solve_or_not | Did this article solve a problem you had with Firefox? | 10 | b | | |||
| 2 | kb_easy_to_understand | Was this article easy to understand? | 20 | b | | |||
| 3 | kb_ease_of_solving | Please rate your experience with solving your problem on support.mozilla.com from 1 (very unsatisfied) to 5 (very satisfied). | 5 | r | | |||
| 4 | chat_solve_or_not | Did this live chat session solve a problem you had with Firefox? | 10 | b | | |||
| 5 | chat_problem_not_solved | Why were you unable to resolve your problem? | 5 | r | | |||
+----------------+-------------------------+-------------------------------------------------------------------------------------------------------------------------------+----------+------------+ |
edits