Difference between revisions of "InstaGov/schema/edit log field"
Jump to navigation
Jump to search
(Created page with "==About== * '''Purpose''': logs changes to individual fields (one field per record) * '''Depends on''': {{l/same|edit_log}} ==Fields== * '''ModField''': name of field whose mo...") |
(corrected primary key) |
||
Line 2: | Line 2: | ||
* '''Purpose''': logs changes to individual fields (one field per record) | * '''Purpose''': logs changes to individual fields (one field per record) | ||
* '''Depends on''': {{l/same|edit_log}} | * '''Depends on''': {{l/same|edit_log}} | ||
+ | ==History== | ||
+ | * '''2013-01-06''' Corrected primary key | ||
==Fields== | ==Fields== | ||
* '''ModField''': name of field whose modification is being recorded; same note applies as for Table | * '''ModField''': name of field whose modification is being recorded; same note applies as for Table | ||
Line 12: | Line 14: | ||
`ValOld` VARCHAR(255) NOT NULL COMMENT "value before edit", | `ValOld` VARCHAR(255) NOT NULL COMMENT "value before edit", | ||
`ValNew` VARCHAR(255) NOT NULL COMMENT "value after edit", | `ValNew` VARCHAR(255) NOT NULL COMMENT "value after edit", | ||
− | + | PRIMARY KEY(`ID_Event`,`ModField`) | |
) | ) | ||
ENGINE = MYISAM;</mysql> | ENGINE = MYISAM;</mysql> |
Latest revision as of 18:57, 6 January 2013
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>