forked from pkp/pkp-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkp#9455 Add support for multiple occurrences on review reminders
- Loading branch information
Showing
61 changed files
with
362 additions
and
129 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
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
53 changes: 53 additions & 0 deletions
53
classes/migration/upgrade/v3_5_0/I9455_ReviewRemindersOccurrences.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,53 @@ | ||
<?php | ||
|
||
/** | ||
* @file classes/migration/upgrade/v3_5_0/I9455_ReviewRemindersOccurrences.php | ||
* | ||
* Copyright (c) 2014-2023 Simon Fraser University | ||
* Copyright (c) 2000-2023 John Willinsky | ||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. | ||
* | ||
* @class I9455_ReviewRemindersOccurrences | ||
*/ | ||
|
||
namespace PKP\migration\upgrade\v3_5_0; | ||
|
||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
use PKP\migration\Migration; | ||
|
||
class I9455_ReviewRemindersOccurrences extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::table('review_assignments', function (Blueprint $table) { | ||
$table->after('date_rated', function (Blueprint $table) { | ||
$table->dateTime('date_invite_reminded')->nullable(); | ||
$table->smallInteger('count_invite_reminder')->default(0); | ||
}); | ||
|
||
// Rename date_reminded to date_submit_reminded to avoid confusion with another column with a similar name | ||
$table->renameColumn('date_reminded', 'date_submit_reminded'); | ||
|
||
$table->after('date_reminded', function (Blueprint $table) { | ||
$table->smallInteger('count_submit_reminder')->default(0); | ||
}); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migration. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::table('review_assignments', function (Blueprint $table) { | ||
$table->dropColumn('date_invite_reminded'); | ||
$table->dropColumn('count_invite_reminder'); | ||
$table->renameColumn('date_submit_reminded', 'date_reminded'); | ||
$table->dropColumn('count_submit_reminder'); | ||
}); | ||
} | ||
} |
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
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
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
Oops, something went wrong.