diff options
| author | Marcus Eibrink-Lunzenauer <lunzenauer@elan-ev.de> | 2025-01-15 09:08:37 +0000 |
|---|---|---|
| committer | Marcus Eibrink-Lunzenauer <lunzenauer@elan-ev.de> | 2025-01-15 09:08:37 +0000 |
| commit | 58ca2df83f308e8acf8cddfbae68c3cf6abdd316 (patch) | |
| tree | d9c5f59556525d1e703352dc1ba536096f3e949d /db | |
| parent | 8da661dad2dcefddce9fbb2bbb0e6dd1d1127db0 (diff) | |
Integration von Peer-Review in Courseware
Closes #2484
Merge request studip/studip!3196
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrations/6.0.41_add_peer_review_tables.php | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/db/migrations/6.0.41_add_peer_review_tables.php b/db/migrations/6.0.41_add_peer_review_tables.php new file mode 100644 index 0000000..893d59a --- /dev/null +++ b/db/migrations/6.0.41_add_peer_review_tables.php @@ -0,0 +1,56 @@ +<?php +class AddPeerReviewTables extends Migration +{ + public function description() + { + return "Adds the Courseware peer review tables."; + } + + public function up() + { + $db = \DBManager::get(); + + $db->exec( + "CREATE TABLE `cw_peer_review_processes`( + `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + `task_group_id` INT(11) NOT NULL, + `owner_id` CHAR(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, + `configuration` MEDIUMTEXT NOT NULL, + `review_start` INT(11) UNSIGNED NOT NULL, + `review_end` INT(11) UNSIGNED NOT NULL, + `paired_at` INT(11) UNSIGNED NULL, + `mkdate` INT(11) UNSIGNED NOT NULL, + `chdate` INT(11) UNSIGNED NOT NULL, + PRIMARY KEY(`id`), + INDEX index_task_group_id(`task_group_id`), + INDEX index_owner_id(`owner_id`) + )" + ); + + $db->exec( + "CREATE TABLE `cw_peer_reviews`( + `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + `process_id` INT(11) UNSIGNED NOT NULL, + `task_id` INT(11) UNSIGNED NOT NULL, + `submitter_id` CHAR(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, + `reviewer_id` CHAR(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, + `reviewer_type` ENUM('autor', 'group') COLLATE latin1_bin, + `assessment` TEXT, + `mkdate` INT(11) UNSIGNED NOT NULL, + `chdate` INT(11) UNSIGNED NOT NULL, + PRIMARY KEY(`id`), + INDEX index_process_id(`process_id`), + INDEX index_task_id(`task_id`), + INDEX index_submitter_id(`submitter_id`), + INDEX index_reviewer_id(`reviewer_id`) + )" + ); + } + + public function down() + { + $db = \DBManager::get(); + $db->exec('DROP TABLE IF EXISTS `cw_peer_reviews`'); + $db->exec('DROP TABLE IF EXISTS `cw_peer_review_processes`'); + } +} |
