Skip to content

Commit 90b5183

Browse files
authored
Merge pull request #926 from kaitlinnewson/10659-3_5_0
pkp/pkp-lib#10659 upgrade crossref schema to 5.4.0
2 parents 92f7eab + 78e2933 commit 90b5183

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
/**
4+
* @file classes/migration/upgrade/v3_5_0/I10659_UpdateCrossrefSchema.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 I10659_UpdateCrossrefSchema
11+
*
12+
* @brief Upgrade Crossref schema in filter_groups.
13+
*/
14+
15+
namespace APP\migration\upgrade\v3_5_0;
16+
17+
use Illuminate\Support\Facades\DB;
18+
use PKP\install\DowngradeNotSupportedException;
19+
20+
class I10659_UpdateCrossrefSchema extends \PKP\migration\Migration
21+
{
22+
/**
23+
* Run the migration.
24+
*/
25+
public function up(): void
26+
{
27+
DB::table('filter_groups')
28+
->where('symbolic', 'preprint=>crossref-xml')
29+
->update(['output_type' => 'xml::schema(https://www.crossref.org/schemas/crossref5.4.0.xsd)']);
30+
}
31+
32+
/**
33+
* Reverse the downgrades
34+
*
35+
* @throws DowngradeNotSupportedException
36+
*/
37+
public function down(): void
38+
{
39+
throw new DowngradeNotSupportedException();
40+
}
41+
}

dbscripts/xml/upgrade.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
<!-- Intentional re-run of 3.4.0 migration; see https://github.com/pkp/pkp-lib/issues/10264#issuecomment-2702413991 -->
153153
<migration class="PKP\migration\upgrade\v3_4_0\I7624_StrftimeDeprecation"/>
154154
<migration class="PKP\migration\upgrade\v3_5_0\I11238_PrepareDBForStructuredCitations"/>
155+
<migration class="APP\migration\upgrade\v3_5_0\I10659_UpdateCrossrefSchema"/>
155156
<note file="docs/release-notes/README-3.5.0" />
156157
</upgrade>
157158

0 commit comments

Comments
 (0)