Difference between revisions of "Schema:submissions"

From ISFDB
Jump to navigation Jump to search
(→‎Description: Added LinkReview)
(→‎Description: 2016 update)
Line 20: Line 20:
 
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]].
 
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''' - This column is the unique record id for the submissions table. A submission may be referred to by this unique id.
+
* '''sub_id''' - Unique record ID for the submissions table.
  
* '''sub_state''' - A submission may be in one of three states: New, Rejected, or Integrated. When data is submitted into the table, the record is placed into the New state. After review by a moderator, the moderator may either choose to Integrate or Reject the submission.
+
* '''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_type''' - This column holds the submission type:
+
* '''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)
** 1 = AuthorMerge
 
** 2 = AuthorUpdate
 
** 3 = AuthorDelete
 
** 4 = PubUpdate
 
** 5 = PubMerge
 
** 6 = PubDelete
 
** 7 = PubNew
 
** 8 = TitleUpdate
 
** 9 = TitleMerge
 
** 10 = TitleDelete
 
** 11 = TitleNew
 
** 12 = TitleUnmerge
 
** 13 = SeriesUpdate
 
** 14 = ContentUpdate
 
** 15 = VariantTitle
 
** 16 = MakeVariant
 
** 17 = TitleRemove
 
** 18 = ClonePub
 
** 19 = MakePseudonym
 
** 20 = NewAward
 
** 21 = AwardUpdate
 
** 22 = AwardDelete
 
** 23 - PublisherUpdate
 
** 24 - PublisherMerge
 
** 25 - LinkReview
 
  
* '''sub_data''' - The XML string of the submission is stored here.
+
* '''sub_data''' - The XML string of the submission.
  
* '''sub_time''' - This field contains the time of the submission.
+
* '''sub_time''' - Date and time of the submission.
  
* '''sub_reviewed''' - This field contains the date/time the submission was reviewed.
+
* '''sub_reviewed''' - Date and time when the submission was approved or rejected.
  
* '''sub_submitter''' - This field contains the user id of the submitter.
+
* '''sub_submitter''' - User id of the submitter. Pointer to mw_user.
  
* '''sub_reviewer''' - This field contains the user id of the reviewer.
+
* '''sub_reviewer''' - User id of the reviewer. Pointer to mw_user.
  
* '''sub_reason''' - This field contains the reason why the submission was rejected.
+
* '''sub_reason''' - The reason why the submission was rejected.
  
* '''sub_holdid''' - This field contains the user id of the reviewer who placed the submission on hold.
+
* '''sub_holdid''' - User id of the moderator who placed the submission on hold. Pointer to mw_user.

Revision as of 15:49, 3 September 2016

Schema Summary

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

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 "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_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.