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

<!--
  * 2.4.0_idupdate_article_supplementary_files.xml
  *
  * Copyright (c) 2013-2016 Simon Fraser University Library
  * Copyright (c) 2003-2016 John Willinsky
  * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
  *
  * 2.4.0 id update pre-migration script, run prior to schema sync.
  *
  -->

<data>
	<!-- Prepare migration of public ids and DOIs to settings tables -->
	<sql>
		<query>INSERT INTO article_supp_file_settings (supp_id, setting_name, setting_value, setting_type, locale) SELECT supp_id, 'pub-id::publisher-id', public_supp_file_id, 'string', '' FROM article_supplementary_files</query>

		<query driver="postgres7">
			DROP INDEX article_supplementary_files_file_id
		</query>
		<query driver="postgres7">
			DROP INDEX article_supplementary_files_article_id
		</query>
	</sql>
</data>
