aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/5.1.46_fix_for_biest2591.php
blob: 4617ff9d10558beb222ff728142a915499baa2ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
final class FixForBiest2591 extends Migration
{
    protected function up()
    {
        $query = "DELETE `tools_activated`
                  FROM `tools_activated`
                  JOIN `seminare` ON `range_id` = `Seminar_id`
                  WHERE `seminare`.`status` IN (
                    SELECT `id`
                    FROM `sem_classes`
                    WHERE `studygroup_mode` = 1
                  ) AND `plugin_id` IN (
                    SELECT `pluginid`
                    FROM `plugins`
                    WHERE `pluginclassname` = 'CoreParticipants'
                  )";
        DBManager::get()->exec($query);
    }
}