main_action

0 rows


Description

Table recording mutation actions (it can be used for infinite undo). This table stores the state of the action (rewound or not), the date of the change, and the edition that the action is associated with. The table single_action links to the entries here and describes the table in which the action occurred, the id of the entry in that table that was involved, and the nature of the action (creating a connection between that entry and the edition of the main_action, or deleting the connection between that entry and the edition of the main_action).

Columns

Column Type Size Nulls Auto Default Children Parents Comments
main_action_id INT UNSIGNED 10 null
single_action.main_action_id fk_single_action_to_mainC
time DATETIME 26 current_timestamp(6)

The time that the database action was performed.

rewinded TINYINT UNSIGNED 3 0

Boolean relaying whether the particular action has been rewound or not.

edition_editor_id INT UNSIGNED 10 0
edition_editor.edition_editor_id fk_main_action_to_edition_editorR

Id of the editor who performed the action.

edition_id INT UNSIGNED 10 0
edition.edition_id fk_main_action_to_editionR

Id of the edition in which the action was performed.

Indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc main_action_id
all_idx Must be unique Asc/Asc/Asc main_action_id + edition_id + edition_editor_id
fk_main_action_to_edition Performance Asc edition_id
main_action_to_scroll_version_idx Performance Asc edition_editor_id

Relationships