-
Notifications
You must be signed in to change notification settings - Fork 451
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#10759 Store ORCID's review work put codes in review_assignment_table
- Loading branch information
1 parent
64762ae
commit 04e90fd
Showing
6 changed files
with
111 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
/** | ||
* @file classes/migration/install/ReviewAssignmentSettings.php | ||
* | ||
* Copyright (c) 2025 Simon Fraser University | ||
* Copyright (c) 2025 John Willinsky | ||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. | ||
* | ||
* @class ReviewAssignmentSettings | ||
* | ||
* @brief Add review_assignment_settings table | ||
*/ | ||
|
||
namespace PKP\migration\install; | ||
|
||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
use PKP\migration\Migration; | ||
|
||
class ReviewAssignmentSettings extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::create('review_assignment_settings', function (Blueprint $table) { | ||
$table->bigIncrements('review_assignment_settings_id')->primary()->comment('Primary key.'); | ||
$table->bigInteger('review_id')->comment('Foreign key referencing record in review_assignments table'); | ||
$table->string('locale', 28)->nullable()->comment('Locale key.'); | ||
$table->string('setting_name', 255)->comment('Name of settings record.'); | ||
$table->mediumText('setting_value')->nullable()->comment('Settings value.'); | ||
|
||
$table->unique(['review_id', 'locale', 'setting_name'], 'review_assignment_settings_unique'); | ||
$table->foreign('review_id')->references('review_id')->on('review_assignments')->onDelete('cascade')->onUpdate('cascade'); | ||
$table->index(['review_id'], 'review_assignment_settings_review_id'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migration. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::drop('review_assignment_settings'); | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
classes/migration/upgrade/v3_5_0/I10759_AddReviewAssignmentSettings.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
/** | ||
* @file classes/migration/upgrade/v3_5_0/I10759_AddReviewAssignmentSettings.php | ||
* | ||
* Copyright (c) 2025 Simon Fraser University | ||
* Copyright (c) 2025 John Willinsky | ||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. | ||
* | ||
* @class I10759_AddReviewAssignmentSettings | ||
* | ||
* @brief Add review_assignment_settings table | ||
*/ | ||
|
||
namespace PKP\migration\upgrade\v3_5_0; | ||
|
||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
use PKP\migration\Migration; | ||
|
||
class I10759_AddReviewAssignmentSettings extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::create('review_assignment_settings', function (Blueprint $table) { | ||
$table->bigIncrements('review_assignment_settings_id')->primary()->comment('Primary key.'); | ||
$table->bigInteger('review_id')->comment('Foreign key referencing record in review_assignments table'); | ||
$table->string('locale', 28)->nullable()->comment('Locale key.'); | ||
$table->string('setting_name', 255)->comment('Name of settings record.'); | ||
$table->mediumText('setting_value')->nullable()->comment('Settings value.'); | ||
|
||
$table->unique(['review_id', 'locale', 'setting_name'], 'review_assignment_settings_unique'); | ||
$table->foreign('review_id')->references('review_id')->on('review_assignments')->onDelete('cascade')->onUpdate('cascade'); | ||
$table->index(['review_id'], 'review_assignment_settings_review_id'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migration. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::drop('review_assignment_settings'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters