Skip to content

Commit 4c72b8b

Browse files
committed
pkp/pkp-lib#11241 Added missing decisions migration for OPS
1 parent 2540668 commit 4c72b8b

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
/**
4+
* @file classes/migration/upgrade/v3_5_0/I11241_MissingDecisionConstantsUpdate.php
5+
*
6+
* Copyright (c) 2025 Simon Fraser University
7+
* Copyright (c) 2025 John Willinsky
8+
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
9+
*
10+
* @class I11241_MissingDecisionConstantsUpdate
11+
*
12+
* @brief Fixed the missing decisions data in stages
13+
*
14+
* @see https://github.com/pkp/pkp-lib/issues/11241
15+
* https://github.com/pkp/pkp-lib/issues/9533
16+
*/
17+
18+
namespace APP\migration\upgrade\v3_5_0;
19+
20+
class I11241_MissingDecisionConstantsUpdate extends \PKP\migration\upgrade\v3_4_0\I7725_DecisionConstantsUpdate
21+
{
22+
/**
23+
* Get the decisions constants mappings
24+
*/
25+
public function getDecisionMappings(): array
26+
{
27+
return [
28+
// \PKP\decision\Decision::INITIAL_DECLINE
29+
[
30+
'stage_id' => WORKFLOW_STAGE_ID_PRODUCTION,
31+
'current_value' => 9,
32+
'updated_value' => 8,
33+
],
34+
// \PKP\decision\Decision::REVERT_DECLINE to \PKP\decision\Decision::REVERT_INITIAL_DECLINE
35+
// \PKP\decision\Decision::REVERT_DECLINE removed in 3.4
36+
[
37+
'stage_id' => WORKFLOW_STAGE_ID_PRODUCTION,
38+
'current_value' => 17,
39+
'updated_value' => 16,
40+
]
41+
];
42+
}
43+
}

dbscripts/xml/upgrade.xml

+1
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@
153153
<migration class="PKP\migration\upgrade\v3_4_0\I7624_StrftimeDeprecation"/>
154154
<migration class="PKP\migration\upgrade\v3_5_0\I11238_PrepareDBForStructuredCitations"/>
155155
<migration class="APP\migration\upgrade\v3_5_0\I10659_UpdateCrossrefSchema"/>
156+
<migration class="APP\migration\upgrade\v3_5_0\I11241_MissingDecisionConstantsUpdate"/>
156157
<note file="docs/release-notes/README-3.5.0" />
157158
</upgrade>
158159

0 commit comments

Comments
 (0)