Difference between revisions of "Schema:submissions"

From ISFDB
Jump to navigation Jump to search
(→‎Description: 2016 update)
(Added affected_record_id; updated the list of supported values of the submission state field)
 
Line 1: Line 1:
 
==Schema Summary==
 
==Schema Summary==
  
  +---------------+-------------------+------+-----+---------+----------------+
+
  +--------------------+-----------------------+------+-----+---------+----------------+
  | Field         | Type             | Null | Key | Default | Extra          |
+
  | Field             | Type                 | Null | Key | Default | Extra          |
  +---------------+-------------------+------+-----+---------+----------------+
+
  +--------------------+-----------------------+------+-----+---------+----------------+
  | sub_id       | int(11)           | NO  | PRI | NULL    | auto_increment |
+
  | sub_id             | int(11)               | NO  | PRI | NULL    | auto_increment |
  | sub_state     | enum('N','R','I') | YES  |     | NULL    |                |
+
  | sub_state         | enum('N','R','I','P') | YES  | MUL | NULL    |                |
  | sub_type     | int(11)           | YES  |    | NULL    |                |
+
  | sub_type           | int(11)               | YES  |    | NULL    |                |
  | sub_data     | mediumtext       | YES  |    | NULL    |                |
+
  | sub_data           | mediumtext           | YES  |    | NULL    |                |
  | sub_time     | datetime         | YES  |    | NULL    |                |
+
  | sub_time           | datetime             | YES  |    | NULL    |                |
  | sub_reviewed | datetime         | YES  |     | NULL    |                |
+
  | sub_reviewed       | datetime             | YES  | MUL | NULL    |                |
  | sub_submitter | int(11)           | NO  |    | 0      |                |
+
  | sub_submitter     | int(11)               | NO  |    | 0      |                |
  | sub_reviewer | int(11)           | NO  |     | 0      |                |
+
  | sub_reviewer       | int(11)               | NO  | MUL | 0      |                |
  | sub_reason   | mediumtext       | YES  |    | NULL    |                |
+
  | sub_reason         | mediumtext           | YES  |    | NULL    |                |
  | sub_holdid   | int(11)           | NO  |    | 0      |                |
+
  | sub_holdid         | int(11)               | NO  |    | 0      |                |
  +---------------+-------------------+------+-----+---------+----------------+
+
| affected_record_id | int(11)              | YES  | MUL | NULL    |                |
 +
  +--------------------+-----------------------+------+-----+---------+----------------+
  
 
==Description==
 
==Description==
Line 22: Line 23:
 
* '''sub_id''' - Unique record ID for the submissions table.
 
* '''sub_id''' - Unique record ID for the submissions table.
  
* '''sub_state''' - Submission state code. The currently supported submissions state codes are "N" for "New", "R" for "Rejected" and "I" for Integrated (i.e. "Approved".) When a submission is created and added to this table, the state code is "N". Submissions approved by a moderator change they status to "I". Submissions rejected by a moderator change their status to "R".
+
* '''sub_state''' - Submission state code. The currently supported submissions state codes are:
 +
** "I": "Integrated", i.e. "Approved"
 +
** "N": "New"
 +
** "P": "In Progress or Errored Out"
 +
** "R": "Rejected"
 +
* When a submission is created and added to this table, the value of this field is set to "N". When the submission approval process starts, the value of this field is set to "P". When the submission approval process completes, the value of this field is set to "I". If a submission is rejected by a moderator, the value of this field is set to "R".
  
 
* '''sub_type''' - Numeric code of the submission type. The current list of supported submission types and their numeric values can be found in module common/isfdb.py starting with MOD_AUTHOR_MERGE (1)
 
* '''sub_type''' - Numeric code of the submission type. The current list of supported submission types and their numeric values can be found in module common/isfdb.py starting with MOD_AUTHOR_MERGE (1)
Line 32: Line 38:
 
* '''sub_reviewed''' - Date and time when the submission was approved or rejected.
 
* '''sub_reviewed''' - Date and time when the submission was approved or rejected.
  
* '''sub_submitter''' - User id of the submitter. Pointer to mw_user.
+
* '''sub_submitter''' - User ID of the submitter. Pointer to mw_user.
  
* '''sub_reviewer''' - User id of the reviewer. Pointer to mw_user.
+
* '''sub_reviewer''' - User ID of the reviewer. Pointer to mw_user.
  
 
* '''sub_reason''' - The reason why the submission was rejected.
 
* '''sub_reason''' - The reason why the submission was rejected.
  
* '''sub_holdid''' - User id of the moderator who placed the submission on hold. Pointer to mw_user.
+
* '''sub_holdid''' - User ID of the moderator who placed the submission on hold. Pointer to mw_user.
 +
 
 +
* '''affected_record_id''' - Record ID of the database record which was created or affected by this submission. Currently only a few submission types populate this field.

Latest revision as of 10:55, 6 March 2020

Schema Summary

+--------------------+-----------------------+------+-----+---------+----------------+
| Field              | Type                  | Null | Key | Default | Extra          |
+--------------------+-----------------------+------+-----+---------+----------------+
| sub_id             | int(11)               | NO   | PRI | NULL    | auto_increment |
| sub_state          | enum('N','R','I','P') | YES  | MUL | NULL    |                |
| sub_type           | int(11)               | YES  |     | NULL    |                |
| sub_data           | mediumtext            | YES  |     | NULL    |                |
| sub_time           | datetime              | YES  |     | NULL    |                |
| sub_reviewed       | datetime              | YES  | MUL | NULL    |                |
| sub_submitter      | int(11)               | NO   |     | 0       |                |
| sub_reviewer       | int(11)               | NO   | MUL | 0       |                |
| sub_reason         | mediumtext            | YES  |     | NULL    |                |
| sub_holdid         | int(11)               | NO   |     | 0       |                |
| affected_record_id | int(11)               | YES  | MUL | NULL    |                |
+--------------------+-----------------------+------+-----+---------+----------------+

Description

The submission table holds XML records of new, updated, and deleted ISFDB records. The format of the XML records can be found in the article Data Submission Formats.

  • sub_id - Unique record ID for the submissions table.
  • sub_state - Submission state code. The currently supported submissions state codes are:
    • "I": "Integrated", i.e. "Approved"
    • "N": "New"
    • "P": "In Progress or Errored Out"
    • "R": "Rejected"
  • When a submission is created and added to this table, the value of this field is set to "N". When the submission approval process starts, the value of this field is set to "P". When the submission approval process completes, the value of this field is set to "I". If a submission is rejected by a moderator, the value of this field is set to "R".
  • sub_type - Numeric code of the submission type. The current list of supported submission types and their numeric values can be found in module common/isfdb.py starting with MOD_AUTHOR_MERGE (1)
  • sub_data - The XML string of the submission.
  • sub_time - Date and time of the submission.
  • sub_reviewed - Date and time when the submission was approved or rejected.
  • sub_submitter - User ID of the submitter. Pointer to mw_user.
  • sub_reviewer - User ID of the reviewer. Pointer to mw_user.
  • sub_reason - The reason why the submission was rejected.
  • sub_holdid - User ID of the moderator who placed the submission on hold. Pointer to mw_user.
  • affected_record_id - Record ID of the database record which was created or affected by this submission. Currently only a few submission types populate this field.