KUNTUL | JINGKONTOT
JINGKONTOT


Server : Apache/2.4.41 (Ubuntu)
System : Linux journalup 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /var/www/html/dbscripts/xml/upgrade/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/dbscripts/xml/upgrade/3.1.1_update.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE data SYSTEM "../../../lib/pkp/dtd/xmlData.dtd">

<!--
  * 3.1.1_update.xml
  *
  * Copyright (c) 2014-2020 Simon Fraser University
  * Copyright (c) 2003-2020 John Willinsky
  * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
  *
  * 3.1.1.0 general updates.
  -->
<data>
	<sql><!-- pkp/pkp-lib#2441 rename masthead to editorialTeam in journal_settings -->
		<query>UPDATE journal_settings SET setting_name = 'editorialTeam' WHERE setting_name = 'masthead'</query>
	</sql>
	<sql>
		<!-- issue #2874: remove citationLookup, citationParser and nlm30 metadata plugin -->
		<!-- remove filter_settings -->
		<query driver="mysql,mysqli">DELETE FROM fs USING filter_settings fs INNER JOIN filters f ON (fs.filter_id = f.filter_id) INNER JOIN filter_groups fg ON (f.filter_group_id = fg.filter_group_id AND fg.symbolic IN ('citation=>nlm30', 'isbn=>nlm30-element-citation', 'nlm30-article-xml=>nlm23-article-xml', 'nlm30-element-citation=>isbn', 'nlm30-element-citation=>nlm30-element-citation', 'nlm30-element-citation=>nlm30-xml', 'nlm30-element-citation=>plaintext', 'nlm30=>citation', 'plaintext=>nlm30-element-citation', 'submission=>nlm23-article-xml', 'submission=>nlm30-article-xml', 'submission=>reference-list'))</query>
		<query driver="postgres,postgres64,postgres7,postgres8,postgres9">DELETE FROM filter_settings fs USING filters f, filter_groups fg WHERE fs.filter_id = f.filter_id AND f.filter_group_id = fg.filter_group_id AND fg.symbolic IN ('citation=>nlm30', 'isbn=>nlm30-element-citation', 'nlm30-article-xml=>nlm23-article-xml', 'nlm30-element-citation=>isbn', 'nlm30-element-citation=>nlm30-element-citation', 'nlm30-element-citation=>nlm30-xml', 'nlm30-element-citation=>plaintext', 'nlm30=>citation', 'plaintext=>nlm30-element-citation', 'submission=>nlm23-article-xml', 'submission=>nlm30-article-xml', 'submission=>reference-list')</query>
		<!-- remove filters -->
		<query driver="mysql,mysqli">DELETE FROM f USING filters f INNER JOIN filter_groups fg ON (f.filter_group_id = fg.filter_group_id AND fg.symbolic IN ('citation=>nlm30', 'isbn=>nlm30-element-citation', 'nlm30-article-xml=>nlm23-article-xml', 'nlm30-element-citation=>isbn', 'nlm30-element-citation=>nlm30-element-citation', 'nlm30-element-citation=>nlm30-xml', 'nlm30-element-citation=>plaintext', 'nlm30=>citation', 'plaintext=>nlm30-element-citation', 'submission=>nlm23-article-xml', 'submission=>nlm30-article-xml', 'submission=>reference-list'))</query>
		<query driver="postgres,postgres64,postgres7,postgres8,postgres9">DELETE FROM filters f USING filter_groups fg WHERE f.filter_group_id = fg.filter_group_id AND fg.symbolic IN ('citation=>nlm30', 'isbn=>nlm30-element-citation', 'nlm30-article-xml=>nlm23-article-xml', 'nlm30-element-citation=>isbn', 'nlm30-element-citation=>nlm30-element-citation', 'nlm30-element-citation=>nlm30-xml', 'nlm30-element-citation=>plaintext', 'nlm30=>citation', 'plaintext=>nlm30-element-citation', 'submission=>nlm23-article-xml', 'submission=>nlm30-article-xml', 'submission=>reference-list')</query>
		<!-- remove filter_groups -->
		<query>DELETE FROM filter_groups WHERE symbolic IN ('citation=>nlm30', 'isbn=>nlm30-element-citation', 'nlm30-article-xml=>nlm23-article-xml', 'nlm30-element-citation=>isbn', 'nlm30-element-citation=>nlm30-element-citation', 'nlm30-element-citation=>nlm30-xml', 'nlm30-element-citation=>plaintext', 'nlm30=>citation', 'plaintext=>nlm30-element-citation', 'submission=>nlm23-article-xml', 'submission=>nlm30-article-xml', 'submission=>reference-list')</query>
	</sql>
	<sql><!-- pkp/pkp-lib#3311 rename subject(EnabledSubmission, EnabledWorkflow, Required) to subjects(EnabledSubmission, EnabledWorkflow, Required) in journal_settings -->
		<query>UPDATE journal_settings SET setting_name = 'subjectsEnabledSubmission' WHERE setting_name = 'subjectEnabledSubmission'</query>
		<query>UPDATE journal_settings SET setting_name = 'subjectsEnabledWorkflow' WHERE setting_name = 'subjectEnabledWorkflow'</query>
		<query>UPDATE journal_settings SET setting_name = 'subjectsRequired' WHERE setting_name = 'subjectRequired'</query>
	</sql>
	<!-- pkp/pkp-lib#2894 Set 0 review ratings to NULL -->
	<sql>
		<query>UPDATE review_assignments SET quality = NULL WHERE quality = 0</query>
	</sql>
	<!-- pkp/pkp-lib#2894 Update old localised user gossip entries -->
	<sql>
		<query driver="mysql,mysqli">UPDATE users u, (SELECT user_id, GROUP_CONCAT(DISTINCT setting_value SEPARATOR ' ') AS groupedGossips FROM user_settings WHERE setting_name = 'gossip' AND setting_value &lt;&gt; '' GROUP BY user_id) us SET u.gossip = us.groupedGossips WHERE us.user_id = u.user_id</query>
		<query driver="postgres,postgres64,postgres7,postgres8,postgres9">UPDATE users SET gossip = us.groupedGossips FROM (SELECT user_id, string_agg(DISTINCT setting_value, ' ') AS groupedGossips FROM user_settings WHERE setting_name = 'gossip' AND setting_value &lt;&gt; '' GROUP BY user_id) AS us WHERE us.user_id = users.user_id</query>
		<query>DELETE FROM user_settings WHERE setting_name='gossip'</query>
	</sql>
	<sql><!-- pkp/pkp-lib#3412 Clean up notifications left over from deleted announcements -->
		<query driver="mysql,mysqli">DELETE n FROM notifications n LEFT JOIN announcements a ON (n.assoc_id = a.announcement_id) WHERE a.announcement_id IS NULL AND n.assoc_type = 522</query><!-- ASSOC_TYPE_ANNOUNCEMENT -->
		<query driver="postgres,postgres64,postgres7,postgres8,postgres9">DELETE FROM notifications USING notifications n LEFT JOIN announcements a ON (n.assoc_id = a.announcement_id) WHERE a.announcement_id IS NULL AND n.assoc_type = 522 AND notifications.notification_id = n.notification_id</query><!-- ASSOC_TYPE_ANNOUNCEMENT -->
	</sql>
	<sql><!-- pkp/pkp-lib#3694 migrate DataCite, mEDRA and DOAJ registered status -->
		<!--  we cannot differentiate if the registration was done via API or manually in OJS 2, thus we will use status = registered (as the API was eused) and not markedRegistered -->
		<!-- DataCite -->
		<query>INSERT INTO issue_settings (issue_id, setting_name, setting_value, setting_type) SELECT issue_id, 'datacite::status', 'registered', 'string' FROM issue_settings WHERE setting_name = 'datacite::registeredDoi' AND (setting_value IS NOT NULL OR setting_value &lt;&gt; '') AND issue_id NOT IN (SELECT issue_id FROM issue_settings WHERE setting_name = 'datacite::status')</query>
		<query>INSERT INTO submission_settings (submission_id, setting_name, setting_value) SELECT submission_id, 'datacite::status', 'registered' FROM submission_settings WHERE setting_name = 'datacite::registeredDoi' AND (setting_value IS NOT NULL OR setting_value &lt;&gt; '') AND submission_id NOT IN (SELECT submission_id FROM submission_settings WHERE setting_name = 'datacite::status')</query>
		<query>INSERT INTO submission_galley_settings (galley_id, setting_name, setting_value, setting_type) SELECT galley_id, 'datacite::status', 'registered', 'string' FROM submission_galley_settings WHERE setting_name = 'datacite::registeredDoi' AND (setting_value IS NOT NULL OR setting_value &lt;&gt; '') AND galley_id NOT IN (SELECT galley_id FROM submission_galley_settings WHERE setting_name = 'datacite::status')</query>
		<!-- mEDRA -->
		<query>INSERT INTO issue_settings (issue_id, setting_name, setting_value, setting_type) SELECT issue_id, 'medra::status', 'registered', 'string' FROM issue_settings WHERE setting_name = 'medra::registeredDoi' AND (setting_value IS NOT NULL OR setting_value &lt;&gt; '') AND issue_id NOT IN (SELECT issue_id FROM issue_settings WHERE setting_name = 'medra::status')</query>
		<query>INSERT INTO submission_settings (submission_id, setting_name, setting_value) SELECT submission_id, 'medra::status', 'registered' FROM submission_settings WHERE setting_name = 'medra::registeredDoi' AND (setting_value IS NOT NULL OR setting_value &lt;&gt; '') AND submission_id NOT IN (SELECT submission_id FROM submission_settings WHERE setting_name = 'medra::status')</query>
		<query>INSERT INTO submission_galley_settings (galley_id, setting_name, setting_value, setting_type) SELECT galley_id, 'medra::status', 'registered', 'string' FROM submission_galley_settings WHERE setting_name = 'medra::registeredDoi' AND (setting_value IS NOT NULL OR setting_value &lt;&gt; '') AND galley_id NOT IN (SELECT galley_id FROM submission_galley_settings WHERE setting_name = 'medra::status')</query>
		<!-- DOAJ -->
		<!-- there was no DOAJ API integration in OJS 2, thus only the manuall registration was possible, so we will use status = markedRegistered -->
		<query>INSERT INTO submission_settings (submission_id, setting_name, setting_value) SELECT submission_id, 'doaj::status', 'markedRegistered' FROM submission_settings WHERE setting_name = 'doaj::registered' AND (setting_value IS NOT NULL OR setting_value &lt;&gt; '') AND submission_id NOT IN (SELECT submission_id FROM submission_settings WHERE setting_name = 'doaj::status')</query>
	</sql>
</data>

KUNTUL | JINGKONTOT |