<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE data SYSTEM "../../../lib/pkp/dtd/xmlData.dtd">

<!--
	* dbscripts/xml/upgrade/3.2.1_preupdate_subeditor_categories.xml
	*
	* Copyright (c) 2013-2020 Simon Fraser University
	* Copyright (c) 2003-2020 John Willinsky
	* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
	*
	* Rename section_editors table #5694
	*
	-->

<data>
	<sql>
		<dropindex table="section_editors" index="section_editors_pkey" />
		<dropindex table="section_editors" index="section_editors_context_id" />
		<dropindex table="section_editors" index="section_editors_section_id" />
		<dropindex table="section_editors" index="section_editors_user_id" />
		<rename table="section_editors" column="section_id" to="assoc_id" />
		<rename table="section_editors" to="subeditor_submission_group" />
		<query>ALTER TABLE subeditor_submission_group ADD assoc_type BIGINT</query>
		<query>UPDATE subeditor_submission_group SET assoc_type = 530</query><!-- ASSOC_TYPE_SECTION -->
	</sql>
</data>
