<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE schema SYSTEM "../../dtd/xmlSchema.dtd">
<!--
* xml/schema/submissions.xml
*
* Copyright (c) 2014-2021 Simon Fraser University
* Copyright (c) 2000-2021 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* Submission-related schema (e.g. authors) in XML.
* XML-BASED DESCRIPTORS ARE DEPRECATED AND SHOULD NOT BE EDITED.
-->
<schema version="0.2">
<!--
*
* TABLE submissions
*
-->
<table name="submissions">
<field name="submission_id" type="I8">
<KEY />
<AUTOINCREMENT />
</field>
<field name="locale" type="C2" size="14"/>
<field name="context_id" type="I8">
<NOTNULL />
</field>
<field name="section_id" type="I8">
<!-- DEPRECATED: DO NOT USE. Held over for OJS 3.2 upgrade -->
</field>
<field name="current_publication_id" type="I8" />
<field name="date_last_activity" type="T"/>
<field name="date_submitted" type="T"/>
<field name="last_modified" type="T"/>
<field name="stage_id" type="I8">
<NOTNULL/>
<DEFAULT VALUE="1"/><!-- WORKFLOW_STAGE_ID_SUBMISSION -->
</field>
<field name="status" type="I1">
<NOTNULL/>
<DEFAULT VALUE="1"/><!-- STATUS_QUEUED -->
</field>
<field name="submission_progress" type="I1">
<NOTNULL/>
<DEFAULT VALUE="1"/>
</field>
<field name="work_type" type="I1">
<DEFAULT VALUE="0"/><!-- Used in OMP only; should not be null there -->
</field>
<descr>Submissions</descr>
<index name="submissions_context_id">
<col>context_id</col>
</index>
</table>
<!--
*
* TABLE submission_settings
*
-->
<table name="submission_settings">
<field name="submission_id" type="I8">
<NOTNULL />
</field>
<field name="locale" type="C2" size="14">
<NOTNULL />
<DEFAULT VALUE=""/>
</field>
<field name="setting_name" type="C2" size="255">
<NOTNULL />
</field>
<field name="setting_value" type="X"/>
<descr>Submission metadata</descr>
<index name="submission_settings_submission_id">
<col>submission_id</col>
</index>
<index name="submission_settings_pkey">
<col>submission_id</col>
<col>locale</col>
<col>setting_name</col>
<UNIQUE/>
</index>
</table>
<!--
*
* TABLE publication_settings
*
-->
<table name="publication_settings">
<field name="publication_id" type="I8">
<NOTNULL />
</field>
<field name="locale" type="C2" size="14">
<NOTNULL />
<DEFAULT VALUE=""/>
</field>
<field name="setting_name" type="C2" size="255">
<NOTNULL />
</field>
<field name="setting_value" type="X"/>
<descr>publication metadata</descr>
<index name="publication_settings_publication_id">
<col>publication_id</col>
</index>
<index name="publication_settings_pkey">
<col>publication_id</col>
<col>locale</col>
<col>setting_name</col>
<UNIQUE/>
</index>
</table>
<!--
*
* TABLE authors
*
-->
<table name="authors">
<field name="author_id" type="I8">
<KEY/>
<AUTOINCREMENT/>
</field>
<field name="email" type="C2" size="90">
<NOTNULL/>
</field>
<field name="include_in_browse" type="I1">
<NOTNULL/>
<DEFAULT VALUE="1"/>
</field>
<field name="publication_id" type="I8">
<!-- NOTNULL Constraint commented to allow upgrade to 3.2 -->
</field>
<field name="submission_id" type="I8">
<!-- DEPRECATED Held over for 3.2 upgrade -->
</field>
<field name="seq" type="F">
<NOTNULL/>
<DEFAULT VALUE="0"/>
</field>
<field name="user_group_id" type="I8" />
<descr>Authors for submissions.</descr>
<index name="authors_publication_id">
<col>publication_id</col>
</index>
</table>
<!--
*
* TABLE author_settings
*
-->
<table name="author_settings">
<field name="author_id" type="I8">
<NOTNULL />
</field>
<field name="locale" type="C2" size="14">
<NOTNULL />
<DEFAULT VALUE=""/>
</field>
<field name="setting_name" type="C2" size="255">
<NOTNULL />
</field>
<field name="setting_value" type="X"/>
<field name="setting_type" type="C2" size="6">
<!-- DEPRECATED: Held over for OJS pre-3.2 upgrade -->
</field>
<descr>Language dependent author metadata.</descr>
<index name="author_settings_author_id">
<col>author_id</col>
</index>
<index name="author_settings_pkey">
<col>author_id</col>
<col>locale</col>
<col>setting_name</col>
<UNIQUE/>
</index>
</table>
<!--
*
* TABLE edit_decisions
*
-->
<table name="edit_decisions">
<field name="edit_decision_id" type="I8">
<KEY />
<AUTOINCREMENT/>
</field>
<field name="submission_id" type="I8">
<NOTNULL/>
</field>
<field name="review_round_id" type="I8">
<!-- NOTNULL/ --><!-- For upgrades -->
</field>
<field name="stage_id" type="I8" />
<field name="round" type="I1">
<NOTNULL/>
</field>
<field name="editor_id" type="I8">
<NOTNULL/>
</field>
<field name="decision" type="I1">
<NOTNULL/>
</field>
<field name="date_decided" type="T">
<NOTNULL/>
</field>
<descr>Editor decisions.</descr>
<index name="edit_decisions_submission_id">
<col>submission_id</col>
</index>
<index name="edit_decisions_editor_id">
<col>editor_id</col>
</index>
</table>
<!--
*
* TABLE submission_comments
*
-->
<table name="submission_comments">
<field name="comment_id" type="I8">
<KEY />
<AUTOINCREMENT/>
</field>
<field name="comment_type" type="I8"/>
<field name="role_id" type="I8">
<NOTNULL/>
</field>
<field name="submission_id" type="I8">
<NOTNULL/>
</field>
<field name="assoc_id" type="I8">
<NOTNULL/>
</field>
<field name="author_id" type="I8">
<NOTNULL/>
</field>
<field name="comment_title" type="X">
<NOTNULL/>
</field>
<field name="comments" type="X"/>
<field name="date_posted" type="T"/>
<field name="date_modified" type="T"/>
<field name="viewable" type="I1" />
<descr>Comments posted on submissions</descr>
<index name="submission_comments_submission_id">
<col>submission_id</col>
</index>
</table>
<!--
*
* TABLE queries
*
-->
<table name="queries">
<field name="query_id" type="I8">
<KEY />
<AUTOINCREMENT/>
</field>
<field name="assoc_type" type="I8">
<NOTNULL/>
</field>
<field name="assoc_id" type="I8">
<NOTNULL/>
</field>
<field name="stage_id" type="I1">
<NOTNULL/>
<DEFAULT VALUE="1"/>
</field>
<field name="seq" type="F">
<NOTNULL/>
<DEFAULT VALUE="0"/>
</field>
<field name="date_posted" type="T"/>
<field name="date_modified" type="T"/>
<field name="closed" type="I2">
<NOTNULL/>
<DEFAULT VALUE="0"/>
</field>
<descr>queries posted on submission workflow</descr>
<index name="queries_assoc_id">
<col>assoc_type</col>
<col>assoc_id</col>
</index>
</table>
<!--
*
* TABLE query_participants
*
-->
<table name="query_participants">
<field name="query_id" type="I8">
<NOTNULL />
</field>
<field name="user_id" type="I8">
<NOTNULL/>
</field>
<descr>queries posted on submission workflow</descr>
<index name="query_participants_pkey">
<col>query_id</col>
<col>user_id</col>
<UNIQUE />
</index>
</table>
<!--
*
* TABLE submission_search_keyword_list
*
-->
<table name="submission_search_keyword_list">
<field name="keyword_id" type="I8">
<KEY />
<AUTOINCREMENT/>
</field>
<field name="keyword_text" type="C2" size="60">
<NOTNULL/>
</field>
<descr>List of all keywords.</descr>
<index name="submission_search_keyword_text">
<col>keyword_text</col>
<UNIQUE/>
</index>
</table>
<!--
*
* TABLE submission_search_objects
*
-->
<table name="submission_search_objects">
<field name="object_id" type="I8">
<KEY />
<AUTOINCREMENT/>
</field>
<field name="submission_id" type="I8">
<NOTNULL />
</field>
<field name="type" type="I4">
<NOTNULL />
<descr>Type of item. E.g., abstract, fulltext, etc.</descr>
</field>
<field name="assoc_id" type="I8">
<descr>Optional ID of an associated record (e.g., a file_id)</descr>
</field>
<descr>Indexed objects.</descr>
</table>
<!--
*
* TABLE submission_search_object_keywords
*
-->
<table name="submission_search_object_keywords">
<field name="object_id" type="I8">
<NOTNULL />
</field>
<field name="keyword_id" type="I8">
<NOTNULL />
</field>
<field name="pos" type="I4">
<NOTNULL />
<descr>Word position of the keyword in the object.</descr>
</field>
<descr>Keyword occurrences for each indexed object.</descr>
<index name="submission_search_object_keywords_keyword_id">
<col>keyword_id</col>
</index>
<index name="submission_search_object_keywords_pkey">
<col>object_id</col>
<col>pos</col>
<UNIQUE />
</index>
</table>
</schema>
|