Difference between revisions of "InstaGov/schema/question"
Jump to navigation
Jump to search
(Created page with '==About== * '''Notes''': ** I originally had a "WhenExpires" field as a way of making a decision at a specific time, but I decided that this belongs in a separate table (somethin…') |
(tentatively, this table is redundant) |
||
Line 3: | Line 3: | ||
** I originally had a "WhenExpires" field as a way of making a decision at a specific time, but I decided that this belongs in a separate table (something like "decision point"). Timetable functionality feels "tacked-on", and putting it in a separate table allows keeping that feature from becoming entangled with basic voting. We might want to be able to implement, say, more than one decision-point per question. | ** I originally had a "WhenExpires" field as a way of making a decision at a specific time, but I decided that this belongs in a separate table (something like "decision point"). Timetable functionality feels "tacked-on", and putting it in a separate table allows keeping that feature from becoming entangled with basic voting. We might want to be able to implement, say, more than one decision-point per question. | ||
** Not sure if we'll actually need Pos/Neg_Text; it may be just a frill. | ** Not sure if we'll actually need Pos/Neg_Text; it may be just a frill. | ||
+ | ** '''2011-05-02''' This entire table may be redundant. Current thinking: | ||
+ | *** Each question is a wiki page, marked with a predetermined category. | ||
+ | *** This makes the list of questions queryable through the category table. | ||
+ | *** Use [[W3TPL]] to define display text, using <let name=text>text to display</let>. | ||
+ | *** Maybe we need a way for W3TPL to store <let> data, to make it more searchable -- but that can happen later. | ||
+ | *** (Or maybe, given the simplicity of Question data, we just use <noinclude> to delineate text which should not be shown in question lists. For now, sticking with W3TPL.) | ||
+ | *** Makes no sense to have Pos/Neg Text; that's an Answer thing. | ||
==SQL== | ==SQL== | ||
<section begin=sql /><mysql>CREATE TABLE `question` ( | <section begin=sql /><mysql>CREATE TABLE `question` ( |
Revision as of 02:06, 3 May 2011
About
- Notes:
- I originally had a "WhenExpires" field as a way of making a decision at a specific time, but I decided that this belongs in a separate table (something like "decision point"). Timetable functionality feels "tacked-on", and putting it in a separate table allows keeping that feature from becoming entangled with basic voting. We might want to be able to implement, say, more than one decision-point per question.
- Not sure if we'll actually need Pos/Neg_Text; it may be just a frill.
- 2011-05-02 This entire table may be redundant. Current thinking:
- Each question is a wiki page, marked with a predetermined category.
- This makes the list of questions queryable through the category table.
- Use W3TPL to define display text, using <let name=text>text to display</let>.
- Maybe we need a way for W3TPL to store <let> data, to make it more searchable -- but that can happen later.
- (Or maybe, given the simplicity of Question data, we just use <noinclude> to delineate text which should not be shown in question lists. For now, sticking with W3TPL.)
- Makes no sense to have Pos/Neg Text; that's an Answer thing.
SQL
<mysql>CREATE TABLE `question` (
`ID` INT NOT NULL AUTO_INCREMENT, `Page` varchar(127) COMMENT "wiki page describing question", `WhenCreated` DATETIME NOT NULL COMMENT "when this question was entered", `Pos_Text` VARCHAR(63) DEFAULT NULL COMMENT "optional: default text to show at the 'yes' end of the scale", `Neg_Text` VARCHAR(63) DEFAULT NULL COMMENT "optional: default text to show at the 'no' end of the scale", PRIMARY KEY(`ID`) ) ENGINE = MYISAM;</mysql>