194 lines
4.2 KiB
XML
194 lines
4.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE schema SYSTEM "../../dtd/xmlSchema.dtd">
|
|
|
|
<!--
|
|
* xml/schema/rolesAndUserGroups.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.
|
|
*
|
|
* Roles and User Groups schema in XML.
|
|
* XML-BASED DESCRIPTORS ARE DEPRECATED AND SHOULD NOT BE EDITED.
|
|
-->
|
|
|
|
<schema version="0.2">
|
|
<!--
|
|
*
|
|
* TABLE user_groups
|
|
*
|
|
-->
|
|
<table name="user_groups">
|
|
<field name="user_group_id" type="I8">
|
|
<KEY />
|
|
<AUTOINCREMENT/>
|
|
</field>
|
|
<field name="context_id" type="I8">
|
|
<NOTNULL />
|
|
</field>
|
|
<field name="role_id" type="I8">
|
|
<NOTNULL />
|
|
</field>
|
|
<field name="is_default" type="I1">
|
|
<NOTNULL/>
|
|
<DEFAULT VALUE="0"/>
|
|
</field>
|
|
<field name="show_title" type="I1">
|
|
<NOTNULL/>
|
|
<DEFAULT VALUE="1"/>
|
|
</field>
|
|
<field name="permit_self_registration" type="I1">
|
|
<NOTNULL/>
|
|
<DEFAULT VALUE="0"/>
|
|
</field>
|
|
<field name="permit_metadata_edit" type="I1">
|
|
<NOTNULL/>
|
|
<DEFAULT VALUE="0"/>
|
|
</field>
|
|
<descr>User groups for a context.</descr>
|
|
<index name="user_groups_user_group_id">
|
|
<col>user_group_id</col>
|
|
</index>
|
|
<index name="user_groups_context_id">
|
|
<col>context_id</col>
|
|
</index>
|
|
<index name="user_groups_role_id">
|
|
<col>role_id</col>
|
|
</index>
|
|
</table>
|
|
|
|
<!--
|
|
*
|
|
* TABLE user_group_settings
|
|
*
|
|
-->
|
|
|
|
<table name="user_group_settings">
|
|
<field name="user_group_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>User Group-specific settings</descr>
|
|
<index name="user_group_settings_pkey">
|
|
<col>user_group_id</col>
|
|
<col>locale</col>
|
|
<col>setting_name</col>
|
|
<UNIQUE />
|
|
</index>
|
|
</table>
|
|
|
|
<!--
|
|
*
|
|
* TABLE user_user_groups
|
|
*
|
|
-->
|
|
<table name="user_user_groups">
|
|
<field name="user_group_id" type="I8">
|
|
<NOTNULL />
|
|
</field>
|
|
<field name="user_id" type="I8">
|
|
<NOTNULL />
|
|
</field>
|
|
<descr>User group assignments (mapping of user to user groups)</descr>
|
|
<index name="user_user_groups_user_group_id">
|
|
<col>user_group_id</col>
|
|
</index>
|
|
<index name="user_user_groups_user_id">
|
|
<col>user_id</col>
|
|
</index>
|
|
<index name="user_user_groups_pkey">
|
|
<col>user_group_id</col>
|
|
<col>user_id</col>
|
|
<UNIQUE />
|
|
</index>
|
|
</table>
|
|
|
|
<!--
|
|
*
|
|
* TABLE user_group_stage
|
|
*
|
|
-->
|
|
<table name="user_group_stage">
|
|
<field name="context_id" type="I8">
|
|
<NOTNULL />
|
|
</field>
|
|
<field name="user_group_id" type="I8">
|
|
<NOTNULL />
|
|
</field>
|
|
<field name="stage_id" type="I8">
|
|
<NOTNULL />
|
|
</field>
|
|
<descr>User groups assignments to stages in the workflow</descr>
|
|
<index name="user_group_stage_context_id">
|
|
<col>context_id</col>
|
|
</index>
|
|
<index name="user_group_stage_user_group_id">
|
|
<col>user_group_id</col>
|
|
</index>
|
|
<index name="user_group_stage_stage_id">
|
|
<col>stage_id</col>
|
|
</index>
|
|
<index name="user_group_stage_pkey">
|
|
<col>context_id</col>
|
|
<col>user_group_id</col>
|
|
<col>stage_id</col>
|
|
<UNIQUE />
|
|
</index>
|
|
</table>
|
|
|
|
<!--
|
|
*
|
|
* TABLE stage_assignments
|
|
*
|
|
-->
|
|
<table name="stage_assignments">
|
|
<field name="stage_assignment_id" type="I8">
|
|
<KEY/>
|
|
<AUTOINCREMENT/>
|
|
</field>
|
|
<field name="submission_id" type="I8">
|
|
<NOTNULL/>
|
|
</field>
|
|
<field name="user_group_id" type="I8">
|
|
<NOTNULL/>
|
|
</field>
|
|
<field name="user_id" type="I8">
|
|
<NOTNULL/>
|
|
</field>
|
|
<field name="date_assigned" type="T">
|
|
<NOTNULL/>
|
|
</field>
|
|
<field name="recommend_only" type="I1">
|
|
<NOTNULL/>
|
|
<DEFAULT VALUE="0"/>
|
|
</field>
|
|
<field name="can_change_metadata" type="I1">
|
|
<NOTNULL/>
|
|
<DEFAULT VALUE="0"/>
|
|
</field>
|
|
<descr>Stage Assignments</descr>
|
|
<index name="stage_assignment">
|
|
<col>submission_id</col>
|
|
<col>user_group_id</col>
|
|
<col>user_id</col>
|
|
<UNIQUE />
|
|
</index>
|
|
<index name="stage_assignments_submission_id">
|
|
<col>submission_id</col>
|
|
</index>
|
|
<index name="stage_assignments_user_group_id">
|
|
<col>user_group_id</col>
|
|
</index>
|
|
<index name="stage_assignments_user_id">
|
|
<col>user_id</col>
|
|
</index>
|
|
</table>
|
|
</schema>
|