aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/1.292_add_admin_courses_sidebar_active_elements.php
blob: c58e47e7455ef4246bc0dcbdd9c04985e094047f (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
30
31
32
33
34
35
36
<?php


class AddAdminCoursesSidebarActiveElements extends Migration
{
    public function up()
    {
        $c = DBManager::get();

        $c->exec(
            "INSERT IGNORE INTO `config`
            (`field`, `value`, `type`, `range`, `description`)
            VALUES
            (
                'ADMIN_COURSES_SIDEBAR_ACTIVE_ELEMENTS',
                '',
                'string',
                'user',
                'Diese Einstellung legt fest, welche Elemente in der Seitenleiste der Veranstaltungsübersicht für Admins sichtbar sind.'
            )"
        );
    }


    Public function down()
    {
        $c = DBManager::get();

        $c->exec(
            "DELETE FROM `config` WHERE `field` = 'ADMIN_COURSES_SIDEBAR_ACTIVE_ELEMENTS'"
        );
        $c->exec(
            "DELETE FROM `config_values` where `field` = 'ADMIN_COURSES_SIDEBAR_ACTIVE_ELEMENTS'"
        );
    }
}