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 18:38, 6 January 2013 by Woozle (talk | contribs) (removed some unneeded fields; using new terms template)
Jump to navigation Jump to search

About

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

History

  • 2013-01-06
    • Removed "ID_Solution" field on the assumption that it was an earlier version of "ID_Answer" and should have been removed when that was created.
    • Removed "ID_Proxy" because the schemata for proxying haven't been devised yet, so there's no way to know what would be an appropriate way to record their usage.

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      NOT NULL COMMENT "user ID of user who gave this rating",
  `Value`     INT      NOT NULL COMMENT "rating value",
  `WhenDone`  DATETIME NOT NULL COMMENT "when this rating was posted",
  `Remark`    VARCHAR(255)      COMMENT "voter's comments on this rating (can include link or redirect)",
  PRIMARY KEY(`ID`)
)
ENGINE = MYISAM;</mysql>