Difference between revisions of "InstaGov/schema/answer"
Jump to navigation
Jump to search
(→SQL: fixed missing "T" in "NOT"; tidying) |
(extracted obsolete note; clarified note about field removal) |
||
Line 2: | Line 2: | ||
* '''Purpose''': implements {{igov/term|answer}}s | * '''Purpose''': implements {{igov/term|answer}}s | ||
* '''Rules''': Any {{l/same|question}} may have zero or more answers. New answers can be added at any time. | * '''Rules''': Any {{l/same|question}} may have zero or more answers. New answers can be added at any time. | ||
− | * '''Notes''': | + | * '''Notes''': |
− | ** "WhenExpires" field | + | ** This table originally had a "WhenExpires" field; it was removed for the same reasons given in notes for the "{{l/same|question}}" table. |
− | |||
==SQL== | ==SQL== | ||
<mysql>CREATE TABLE `answer` ( | <mysql>CREATE TABLE `answer` ( |
Revision as of 16:28, 7 January 2013
About
- Purpose: implements answers
- Rules: Any question may have zero or more answers. New answers can be added at any time.
- Notes:
- This table originally had a "WhenExpires" field; it was removed for the same reasons given in notes for the "question" table.
SQL
<mysql>CREATE TABLE `answer` (
`ID` INT NOT NULL AUTO_INCREMENT, `ID_Question` INT NOT NULL COMMENT "question.ID for which this is an answer", `Page` VARCHAR(127) COMMENT "wiki page describing answer", `WhenCreated` DATETIME NOT NULL COMMENT "when this answer was entered", `Pos_Text` VARCHAR(63) DEFAULT NULL COMMENT "optional: text to show at the 'yes' end of the scale (overrides question default)", `Neg_Text` VARCHAR(63) DEFAULT NULL COMMENT "optional: text to show at the 'no' end of the scale (overrides question default)", PRIMARY KEY(`ID`) ) ENGINE = MYISAM;</mysql>