Skip to content

Commit

Permalink
pkp/pkp-lib#8333 Added migration to create extra foreign keys
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Jun 7, 2023
1 parent 1428c7a commit fdca08c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
33 changes: 33 additions & 0 deletions classes/migration/upgrade/v3_4_0/I8333_AddMissingForeignKeys.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

/**
* @file classes/migration/upgrade/v3_4_0/I8333_AddMissingForeignKeys.php
*
* Copyright (c) 2023 Simon Fraser University
* Copyright (c) 2023 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @class I8333_AddMissingForeignKeys
*
* @brief Describe upgrade/downgrade operations for introducing foreign key definitions to existing database relationships.
*/

namespace APP\migration\upgrade\v3_4_0;

class I8333_AddMissingForeignKeys extends \PKP\migration\upgrade\v3_4_0\I8333_AddMissingForeignKeys
{
protected function getContextTable(): string
{
return 'servers';
}

protected function getContextKeyField(): string
{
return 'server_id';
}

protected function getContextSettingsTable(): string
{
return 'server_settings';
}
}
1 change: 1 addition & 0 deletions dbscripts/xml/upgrade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
<migration class="APP\migration\upgrade\v3_4_0\I9040_DropSettingType"/>
<migration class="PKP\migration\upgrade\v3_4_0\I9039_DropDeprecatedFields"/>
<migration class="APP\migration\upgrade\v3_4_0\I8933_EventLogLocalized"/>
<migration class="APP\migration\upgrade\v3_4_0\I8333_AddMissingForeignKeys" />
<note file="docs/release-notes/README-3.4.0" />
</upgrade>

Expand Down

0 comments on commit fdca08c

Please sign in to comment.