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

<!--
  * 2.2.1_update.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.2.1 database updates XML file.
  * WARNING: This script is only executed on the condition that the theses
  * table exists. (See dbscripts/xml/upgrade.xml.)
  *
  -->
<data>
	<!-- Bug #3488: Add RSS feed for thesis abstracts -->
	<sql>
		<!-- Syntax for MySQL. -->
		<query driver="mysql">
			ALTER TABLE theses ADD COLUMN date_submitted DATETIME
		</query>
		<query driver="mysql">
			UPDATE theses SET date_submitted = '2008-01-01 00:00:01'
		</query>
		<query driver="mysql">
			ALTER TABLE theses CHANGE COLUMN date_submitted date_submitted DATETIME NOT NULL
		</query>

		<!-- Syntax for PostgreSQL. -->
		<query driver="postgres7">
			ALTER TABLE theses ADD COLUMN date_submitted TIMESTAMP
		</query>
		<query driver="postgres7">
			UPDATE theses SET date_submitted = '2008-01-01 00:00:01'
		</query>
		<query driver="postgres7">
			ALTER TABLE theses ALTER COLUMN date_submitted SET NOT NULL
		</query>
	</sql>
</data>
