InstaGov/schema/rating log

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 13:41, 20 July 2010 by Woozle (talk | contribs) (Created page with '==About== * '''Purpose''': Records every time a user submits or revises a {{instagov|concepts|rating}} ==SQL== <section begin=sql /><mysql>CREATE TABLE `rating_log` ( `ID` INT…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

  • Purpose: Records every time a user submits or revises a rating

SQL

<mysql>CREATE TABLE `rating_log` (

  `ID` INT  NOT NULL AUTO_INCREMENT,
  `ID_Answer` INT NOT NULL COMMENT "answer.ID for which this is a rating",
  `ID_Rating` INT NOT NULL COMMENT "rating.ID to which this rating was applied",
  `ID_User` INT COMMENT "user.ID of user who gave this rating",
  `ID_Solution` INT NOT NULL COMMENT "solution.ID of solution for which this is a rating",
  `ID_Proxy` INT DEFAULT NULL COMMENT "if this approval was proxied, records who the proxy was",
  `Value` INT NOT NULL COMMENT "rating value",
  `WhenDone` DATETIME NOT NULL COMMENT "when this rating was posted",
  `Remark` VARCHAR(255) COMMENT "comments on this rating (can include link or redirect)",
  PRIMARY KEY(`ID`)
)
ENGINE = MYISAM;</mysql>