aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/5.3.4_remove_allow_tiled_display_configuration.php
blob: 6aa898a4ea6244e6f63ac82dd65874a03e1806c6 (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
<?php
final class RemoveAllowTiledDisplayConfiguration extends Migration
{
    protected function up()
    {
        $query = "DELETE config, config_values
                  FROM `config`
                  LEFT JOIN `config_values` USING(`field`)
                  WHERE `field` = 'MY_COURSES_ALLOW_TILED_DISPLAY'";
        DBManager::get()->exec($query);
    }

    protected function down()
    {
        $query = "INSERT IGNORE INTO `config` (
                    `field`, `value`, `type`, `range`,
                    `section`, `description`,
                    `mkdate`, `chdate`
                  ) VALUES (
                    'MY_COURSES_ALLOW_TILED_DISPLAY', '0', 'boolean', 'global',
                    'MeineVeranstaltungen', 'Soll die Kachelansicht unter \"Meine Veranstaltungen\" aktiviert werden?',
                    UNIX_TIMESTAMP(), UNIX_TIMESTAMP()
                  )";
        DBManager::get()->exec($query);
    }
}