Skip to content

Commit

Permalink
pkp/pkp-lib#8598 DB Migration added
Browse files Browse the repository at this point in the history
  • Loading branch information
defstat committed Feb 14, 2023
1 parent 9f3c005 commit 887c9c5
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
35 changes: 35 additions & 0 deletions classes/migration/upgrade/v3_4_0/MergeLocalesMigration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

/**
* @file classes/migration/upgrade/v3_4_0/MergeLocalesMigration.php
*
* Copyright (c) 2014-2021 Simon Fraser University
* Copyright (c) 2000-2021 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @class MergeLocalesMigration
*
* @brief Change Locales from locale_countryCode localization folder notation to locale localization folder notation
*/

namespace APP\migration\upgrade\v3_4_0;

use Illuminate\Support\Collection;

class MergeLocalesMigration extends \PKP\migration\upgrade\v3_4_0\MergeLocalesMigration
{
protected string $CONTEXT_TABLE = 'presses';
protected string $CONTEXT_SETTINGS_TABLE = 'press_settings';
protected string $CONTEXT_COLUMN = 'press_id';

protected function getSettingsTables(): Collection
{
return collect([
'press_settings' => 'press_id',
'publication_format_settings' => 'publication_format_id',
'series_settings' => 'series_id',
'spotlight_settings' => 'spotlight_id',
'submission_chapter_settings' => 'chapter_id',
])->merge(parent::getSettingsTables());
}
}
2 changes: 1 addition & 1 deletion config.TEMPLATE.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
[i18n]

; Default locale
locale = en_US
locale = en

; Database connection character set
connection_charset = utf8
Expand Down
1 change: 1 addition & 0 deletions dbscripts/xml/upgrade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
<migration class="APP\migration\upgrade\v3_4_0\I7128_SeriesEntityDAORefactor" />
<migration class="PKP\migration\upgrade\v3_4_0\I7486_RenameUnconsideredColumnToConsidered"/>
<migration class="PKP\migration\upgrade\v3_4_0\I7486_RemoveItemViewsTable"/>
<migration class="APP\migration\upgrade\v3_4_0\MergeLocalesMigration"/>
<data file="dbscripts/xml/upgrade/3.4.0_preupdate_email_templates.xml" />
<note file="docs/release-notes/README-3.4.0" />
</upgrade>
Expand Down

0 comments on commit 887c9c5

Please sign in to comment.