Skip to content
Snippets Groups Projects
Commit 3dbf91d2 authored by Thomas Hackl's avatar Thomas Hackl Committed by Jan-Hendrik Willms
Browse files

Resolve "Falsche Migrationsnummer, Migration ignoriert das Tabellenschema"

Closes #3669

Merge request studip/studip!2542
parent fdce2262
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ final class CleanupCwTasks extends Migration ...@@ -11,7 +11,7 @@ final class CleanupCwTasks extends Migration
{ {
DBManager::get()->exec(' DBManager::get()->exec('
DELETE FROM `cw_tasks` DELETE FROM `cw_tasks`
WHERE `solver_type` = "user" WHERE `solver_type` = "autor"
AND `solver_id` NOT IN (SELECT `user_id` FROM `auth_user_md5`)' AND `solver_id` NOT IN (SELECT `user_id` FROM `auth_user_md5`)'
); );
DBManager::get()->exec(' DBManager::get()->exec('
......
<?php
/**
* This migration only exists as a placeholder for the original
* migration 5.5.14 which has been renumbered to 5.1.53 as it was
* downported.
* As everything has already been done in 5.1.53, nothing happens here.
*
* @see https://gitlab.studip.de/studip/studip/-/issues/3669
*/
final class CleanupCwTasksPlaceholder extends Migration
{
public function description()
{
return 'empty placeholder for former migration with wrong number -> see 5.1.53';
}
}
...@@ -990,7 +990,7 @@ class UserManagement ...@@ -990,7 +990,7 @@ class UserManagement
\Courseware\UserProgress::deleteBySQL('user_id = ?', [$this->user_data['auth_user_md5.user_id']]); \Courseware\UserProgress::deleteBySQL('user_id = ?', [$this->user_data['auth_user_md5.user_id']]);
\Courseware\Bookmark::deleteBySQL('user_id = ?', [$this->user_data['auth_user_md5.user_id']]); \Courseware\Bookmark::deleteBySQL('user_id = ?', [$this->user_data['auth_user_md5.user_id']]);
\Courseware\Task::deleteBySQL( \Courseware\Task::deleteBySQL(
'`solver_id` = ? AND `solver_type`= "user"', '`solver_id` = ? AND `solver_type`= "autor"',
[$this->user_data['auth_user_md5.user_id']] [$this->user_data['auth_user_md5.user_id']]
); );
// delete courseware elements in courses of this user // delete courseware elements in courses of this user
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment