Skip to content

Commit

Permalink
pkp/pkp-lib#9892 moved the foreign key check form trait to core pkp m…
Browse files Browse the repository at this point in the history
…igration class
  • Loading branch information
touhidurabir committed Aug 9, 2024
1 parent caa04de commit 5088e4e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
5 changes: 3 additions & 2 deletions classes/install/Upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

use APP\core\Application;
use APP\template\TemplateManager;
use Illuminate\Support\Facades\Schema;
use PKP\db\DAORegistry;
use PKP\install\Installer;
use PKP\navigationMenu\NavigationMenuItemDAO;
Expand Down Expand Up @@ -90,7 +91,7 @@ public function clearCssCache()
*/
public function migrateStaticPagesToNavigationMenuItems()
{
if ($this->tableExists('static_pages')) {
if (Schema::hasTable('static_pages')) {
$contextDao = Application::getContextDAO();
$navigationMenuItemDao = DAORegistry::getDAO('NavigationMenuItemDAO'); /** @var NavigationMenuItemDAO $navigationMenuItemDao */

Expand Down Expand Up @@ -147,4 +148,4 @@ public function _fileStageToPath($fileStage)

if (!PKP_STRICT_MODE) {
class_alias('\APP\install\Upgrade', '\Upgrade');
}
}
3 changes: 0 additions & 3 deletions classes/migration/upgrade/v3_4_0/I6093_AddForeignKeys.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use PKP\core\traits\HasForeignKey;

class I6093_AddForeignKeys extends \PKP\migration\upgrade\v3_4_0\I6093_AddForeignKeys
{
use HasForeignKey;

protected function getContextTable(): string
{
return 'journals';
Expand Down
3 changes: 0 additions & 3 deletions classes/migration/upgrade/v3_4_0/PreflightCheckMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use PKP\core\traits\HasForeignKey;
use Throwable;

class PreflightCheckMigration extends \PKP\migration\upgrade\v3_4_0\PreflightCheckMigration
{
use HasForeignKey;

public function up(): void
{
parent::up();
Expand Down

0 comments on commit 5088e4e

Please sign in to comment.