InstaGov/schema/edit log field

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:57, 6 January 2013 by Woozle (talk | contribs) (corrected primary key)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

  • Purpose: logs changes to individual fields (one field per record)
  • Depends on: edit_log

History

  • 2013-01-06 Corrected primary key

Fields

  • ModField: name of field whose modification is being recorded; same note applies as for Table
  • ValOld: the value before the edit
  • ValNew: the value after the edit

SQL

<mysql>CREATE TABLE `edit_log_field` (

  `ID_Event` INT              NOT NULL COMMENT "ID from edit_log",
  `ModField` VARCHAR(15)      NOT NULL COMMENT "name of field being modified",
  `ValOld`   VARCHAR(255)     NOT NULL COMMENT "value before edit",
  `ValNew`   VARCHAR(255)     NOT NULL COMMENT "value after edit",
 PRIMARY KEY(`ID_Event`,`ModField`)
)
ENGINE = MYISAM;</mysql>