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

<!--
	* dbscripts/xml/upgrade/3.2.0_preupdate_last_activity.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.
	*
	* Migrate the old date_status_modified column in the submissions table to the
	* new date_last_activity column.
	*
	-->

<data>
	<sql>
		<query>
			UPDATE submissions s SET date_last_activity = (
				SELECT date_status_modified FROM temp_last_activity_submissions tlas WHERE tlas.submission_id = s.submission_id
			)
		</query>
		<drop table="temp_last_activity_submissions" />
	</sql>
</data>
