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/ |
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE data SYSTEM "../../../lib/pkp/dtd/xmlData.dtd"> <!-- * 3.1.0_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.0.0 general updates. --> <data> <sql><!-- pkp/pkp-lib#2160: Clean up editorial history --> <query>UPDATE event_log_settings SET setting_name='submissionId' WHERE setting_name='articleId'</query> </sql> <sql><!-- #2173 set the missing response due dates to review due dates --> <query>UPDATE review_assignments SET date_response_due = date_due WHERE date_response_due IS NULL</query> </sql> <sql><!-- pkp/pkp-lib#2310: Move plugins to unified sidebar upon upgrade --> <query>UPDATE plugin_settings SET setting_value=1 WHERE setting_name='context' AND LOWER(plugin_name) LIKE '%blockplugin'</query><!-- 1 is BLOCK_CONTEXT_SIDEBAR --> </sql> <sql><!-- pkp/pkp-lib#2151: set viewable = 1 for submission files (migrated from 2.4.x) --> <query>UPDATE submission_files SET viewable = 1 WHERE file_stage = 2 AND viewable = 0</query><!-- 2 is SUBMISSION_FILE_SUBMISSION --> </sql> <sql> <!--pkp/pkp-lib#2064: update the already existing <a href="{$url}">{$url}</a> pattern to {$url}--> <!--<a href="{$activateUrl}">{$activateUrl}</a>--> <query>UPDATE email_templates_default_data SET body=REPLACE(body, '<a href="{$activateUrl}">{$activateUrl}</a>', '{$activateUrl}')</query> <query>UPDATE email_templates_data SET body=REPLACE(body, '<a href="{$activateUrl}">{$activateUrl}</a>', '{$activateUrl}')</query> <!--<a href="{$url}">{$url}</a>--> <query>UPDATE email_templates_default_data SET body=REPLACE(body, '<a href="{$url}">{$url}</a>', '{$url}')</query> <query>UPDATE email_templates_data SET body=REPLACE(body, '<a href="{$url}">{$url}</a>', '{$url}')</query> <!--<a href="{$contextUrl}">{$contextUrl}</a>--> <query>UPDATE email_templates_default_data SET body=REPLACE(body, '<a href="{$contextUrl}">{$contextUrl}</a>', '{$contextUrl}')</query> <query>UPDATE email_templates_data SET body=REPLACE(body, '<a href="{$contextUrl}">{$contextUrl}</a>', '{$contextUrl}')</query> <!--<a href="{$passwordResetUrl}">{$passwordResetUrl}</a>--> <query>UPDATE email_templates_default_data SET body=REPLACE(body, '<a href="{$passwordResetUrl}">{$passwordResetUrl}</a>', '{$passwordResetUrl}')</query> <query>UPDATE email_templates_data SET body=REPLACE(body, '<a href="{$passwordResetUrl}">{$passwordResetUrl}</a>', '{$passwordResetUrl}')</query> <!--<a href="{$submissionReviewUrl}">{$submissionReviewUrl}</a>--> <query>UPDATE email_templates_default_data SET body=REPLACE(body, '<a href="{$submissionReviewUrl}">{$submissionReviewUrl}</a>', '{$submissionReviewUrl}')</query> <query>UPDATE email_templates_data SET body=REPLACE(body, '<a href="{$submissionReviewUrl}">{$submissionReviewUrl}</a>', '{$submissionReviewUrl}')</query> <!--<a href="{$submissionLayoutUrl}">{$submissionLayoutUrl}</a>--> <query>UPDATE email_templates_default_data SET body=REPLACE(body, '<a href="{$submissionLayoutUrl}">{$submissionLayoutUrl}</a>', '{$submissionLayoutUrl}')</query> <query>UPDATE email_templates_data SET body=REPLACE(body, '<a href="{$submissionLayoutUrl}">{$submissionLayoutUrl}</a>', '{$submissionLayoutUrl}')</query> <!--<a href="{$articleUrl}">{$articleUrl}</a></a>--> <query>UPDATE email_templates_default_data SET body=REPLACE(body, '<a href="{$articleUrl}">{$articleUrl}</a>', '{$articleUrl}')</query> <query>UPDATE email_templates_data SET body=REPLACE(body, '<a href="{$articleUrl}">{$articleUrl}</a>', '{$articleUrl}')</query> <!--<a href="{$subscriptionUrl}">{$subscriptionUrl}</a>--> <query>UPDATE email_templates_default_data SET body=REPLACE(body, '<a href="{$subscriptionUrl}">{$subscriptionUrl}</a>', '{$subscriptionUrl}')</query> <query>UPDATE email_templates_data SET body=REPLACE(body, '<a href="{$subscriptionUrl}">{$subscriptionUrl}</a>', '{$subscriptionUrl}')</query> </sql> <sql> <!-- #2159 add missing first editor decision SUBMISSION_EDITOR_DECISION_EXTERNAL_REVIEW (changing the stage from WORKFLOW_STAGE_ID_SUBMISSION to WORKFLOW_STAGE_ID_EXTERNAL_REVIEW) for those migrated from OJS 2.4.x --> <query>INSERT INTO edit_decisions (submission_id, review_round_id, stage_id, round, decision, editor_id, date_decided) SELECT DISTINCT ed.submission_id, 0, 1, 0, 8, ed.editor_id, ed.date_decided FROM edit_decisions ed JOIN (SELECT submission_id, MIN(date_decided) AS date_decided FROM edit_decisions GROUP BY submission_id) ed1 ON (ed1.submission_id = ed.submission_id) WHERE ed.stage_id = 3 AND ed1.date_decided = ed.date_decided AND NOT EXISTS (SELECT ed2.submission_id FROM edit_decisions ed2 WHERE ed2.stage_id = 1 AND ed2.decision = 8 AND ed2.submission_id = ed.submission_id)</query> </sql> <sql><!-- pkp/pkp-lib#2258 --> <query>UPDATE filter_groups SET output_type = 'xml::schema(https://www.crossref.org/schemas/crossref4.3.6.xsd)' WHERE output_type = 'xml::schema(http://www.crossref.org/schema/deposit/crossref4.3.6.xsd)'</query> </sql> <sql><!-- pkp/pkp-lib#2401 --> <!-- submissionEditingUrl becomes submissionUrl --> <query>UPDATE email_templates_default_data SET body=REPLACE(body, '{$submissionEditingUrl}', '{$submissionUrl}'), subject=REPLACE(subject, '{$submissionEditingUrl}', '{$submissionUrl}')</query> <query>UPDATE email_templates_data SET body=REPLACE(body, '{$submissionEditingUrl}', '{$submissionUrl}'), subject=REPLACE(subject, '{$submissionEditingUrl}', '{$submissionUrl}')</query> </sql> <sql><!-- pkp/pkp-lib#2392 --> <!-- remove old, removed journal settings migrated/concatenated to the new, existing --> <query>DELETE FROM journal_settings WHERE setting_name IN ('focusScopeDesc', 'reviewPolicy', 'pubFreqPolicy', 'openAccessPolicy', 'customAboutItems', 'contributorNote', 'contributors', 'sponsorNote', 'sponsors', 'history')</query> </sql> <sql><!-- pkp/pkp-lib#1816 Payments/subscriptions --> <!-- Remove gifts --> <drop table="gifts" /> <query>DELETE FROM email_templates_default WHERE email_key IN ('GIFT_AVAILABLE', 'GIFT_USER_REGISTER', 'GIFT_USER_LOGIN')</query> <query>DELETE FROM email_templates_default_data WHERE email_key IN ('GIFT_AVAILABLE', 'GIFT_USER_REGISTER', 'GIFT_USER_LOGIN')</query> <query>DELETE FROM email_templates WHERE email_key IN ('GIFT_AVAILABLE', 'GIFT_USER_REGISTER', 'GIFT_USER_LOGIN')</query> <query>DELETE FROM email_templates_data WHERE email_key IN ('GIFT_AVAILABLE', 'GIFT_USER_REGISTER', 'GIFT_USER_LOGIN')</query> <query>DELETE FROM notifications WHERE type IN (33554433, 33554434, 33554435, 33554436, 33554437, 33554438)</query><!-- NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_SUCCESS, NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_NO_GIFT_TO_REDEEM, NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_GIFT_ALREADY_REDEEMED, NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_GIFT_INVALID, NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_SUBSCRIPTION_TYPE_INVALID, NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_SUBSCRIPTION_NON_EXPIRING --> </sql> <sql><!-- pkp/pkp-lib#2671 migrate crossref deposit status setting names --> <!-- First remove the old settings if the new ones already exist, e.g. if already migrated and updated the statuses --> <query driver="mysql,mysqli">DELETE s1 FROM submission_settings s1 LEFT JOIN submission_settings s2 ON (s1.submission_id = s2.submission_id AND s2.setting_name='crossref::status') WHERE s1.setting_name='crossref::depositStatus' AND s2.submission_id IS NOT NULL</query> <query driver="mysql,mysqli">DELETE s1 FROM submission_settings s1 LEFT JOIN submission_settings s2 ON (s1.submission_id = s2.submission_id AND s2.setting_name='crossref::statusUrl') WHERE s1.setting_name='crossref::depositStatusUrl' AND s2.submission_id IS NOT NULL</query> <query driver="postgres,postgres64,postgres7,postgres8,postgres9">DELETE FROM submission_settings USING submission_settings AS s1 LEFT JOIN submission_settings AS s2 ON (s1.submission_id = s2.submission_id AND s2.setting_name='crossref::status') WHERE s1.setting_name='crossref::depositStatus' AND s2.submission_id IS NOT NULL AND s1.submission_id = submission_settings.submission_id AND s1.setting_name = submission_settings.setting_name</query> <query driver="postgres,postgres64,postgres7,postgres8,postgres9">DELETE FROM submission_settings USING submission_settings AS s1 LEFT JOIN submission_settings AS s2 ON (s1.submission_id = s2.submission_id AND s2.setting_name='crossref::statusUrl') WHERE s1.setting_name='crossref::depositStatusUrl' AND s2.submission_id IS NOT NULL AND s1.submission_id = submission_settings.submission_id AND s1.setting_name = submission_settings.setting_name</query> <!-- Then change the old setting names --> <query>UPDATE submission_settings SET setting_name = 'crossref::status' WHERE setting_name = 'crossref::depositStatus' </query> <query>UPDATE submission_settings SET setting_name = 'crossref::statusUrl' WHERE setting_name = 'crossref::depositStatusUrl' </query> </sql> <sql><!-- pkp/pkp-lib#1791 --> <!-- fix assoc_type for supp files, above all for those already migrated: --> <!-- update the ASSOC_TYPE_SUBMISSION_FILE = 515 constant to ASSOC_TYPE_SUBMISSION_FILE_COUNTER_OTHER = 531 defined in PKPApplication --> <query>UPDATE metrics SET assoc_type = 531 WHERE assoc_type = 515 AND assoc_id IN (SELECT file_id FROM submission_supplementary_files)</query> <query>UPDATE metrics SET assoc_type = 531 WHERE assoc_type = 515 AND assoc_id IN (SELECT file_id FROM submission_artwork_files)</query> </sql> <sql><!-- pkp/pkp-lib#2832 --> <!-- remove citationFormats plugins --> <query>DELETE FROM versions WHERE product_type = 'plugins.citationFormats'</query> </sql> <sql><!-- pkp/pkp-lib#2859 --> <!-- remove citationFormats plugins --> <query>DELETE FROM versions WHERE product_type = 'plugins.citationOutput'</query> <query>DELETE FROM journal_settings WHERE setting_name = 'metaCitationOutputFilterId'</query> </sql> <sql><!-- pkp/pkp-lib#2873 --> <query>UPDATE filter_groups SET output_type = 'xml::schema(http://schema.datacite.org/meta/kernel-4/metadata.xsd)' WHERE output_type = 'xml::schema(http://schema.datacite.org/meta/kernel-3/metadata.xsd)'</query> </sql> </data>