Skip to content

Commit 220c7f8

Browse files
committed
pkp/pkp-lib#9533 Decision migration for OPS
1 parent 3fce0fc commit 220c7f8

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
/**
4+
* @file classes/migration/upgrade/v3_4_0/I7725_DecisionConstantsUpdate.php
5+
*
6+
* Copyright (c) 2014-2023 Simon Fraser University
7+
* Copyright (c) 2000-2023 John Willinsky
8+
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
9+
*
10+
* @class I7725_DecisionConstantsUpdate
11+
*
12+
* @brief Editorial decision constant sync up across all application
13+
*
14+
* @see https://github.com/pkp/pkp-lib/issues/7725
15+
*/
16+
17+
namespace APP\migration\upgrade\v3_4_0;
18+
19+
class I7725_DecisionConstantsUpdate extends \PKP\migration\upgrade\v3_4_0\I7725_DecisionConstantsUpdate
20+
{
21+
public function getDecisionMappings(): array
22+
{
23+
return [
24+
// \PKP\decision\Decision::INITIAL_DECLINE
25+
[
26+
'stage_id' => WORKFLOW_STAGE_ID_PRODUCTION,
27+
'current_value' => 9,
28+
'updated_value' => 8,
29+
],
30+
// \PKP\decision\Decision::REVERT_DECLINE to \PKP\decision\Decision::REVERT_INITIAL_DECLINE
31+
// \PKP\decision\Decision::REVERT_DECLINE removed in 3.4
32+
[
33+
'stage_id' => WORKFLOW_STAGE_ID_PRODUCTION,
34+
'current_value' => 17,
35+
'updated_value' => 16,
36+
]
37+
];
38+
}
39+
}

dbscripts/xml/upgrade.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
<migration class="APP\migration\upgrade\v3_4_0\I9040_DropSettingType"/>
9292
<migration class="PKP\migration\upgrade\v3_4_0\I9039_DropDeprecatedFields"/>
9393
<migration class="APP\migration\upgrade\v3_4_0\I8933_EventLogLocalized"/>
94+
<migration class="APP\migration\upgrade\v3_4_0\I7725_DecisionConstantsUpdate"/>
9495
<note file="docs/release-notes/README-3.4.0" />
9596
</upgrade>
9697

0 commit comments

Comments
 (0)