InstaGov/schema/question

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< InstaGov‎ | schema
Revision as of 12:46, 20 July 2010 by Woozle (talk | contribs) (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…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.

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>