aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/5.2.8_remove_table_admissionrule_inst.php
blob: f2bf63fc54895a892d6a06255dc180004a6943a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php

/**
 * @see https://gitlab.studip.de/studip/studip/-/issues/973
 */
final class RemoveTableAdmissionruleInst extends Migration
{
    public function description()
    {
        return 'Removes the unused table admissionrule_inst';
    }

    protected function up()
    {
        $query = "DROP TABLE IF EXISTS `admissionrule_inst`";
        DBManager::get()->exec($query);
    }

    protected function down()
    {
        $query = "CREATE TABLE IF NOT EXISTS `admissionrule_inst` (
                    `rule_id` CHAR(32) COLLATE latin1_bin NOT NULL,
                    `institute_id` CHAR(32) COLLATE latin1_bin NOT NULL,
                    `mkdate` INT(11) UNSIGNED NOT NULL DEFAULT 0,
                    PRIMARY KEY (`rule_id`,`institute_id`)
                  )";
        DBManager::get()->exec($query);
    }
}