aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/5.3.1_add_show_folder_size_config.php
blob: fe45a4cc4016f05c7b1d91cecb0889a84f8428dc (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
<?php


class AddShowFolderSizeConfig extends Migration
{
    public function description()
    {
        return 'Adds the configuration SHOW_FOLDER_SIZE.';
    }


    protected function up()
    {
        DBManager::get()->exec(
            "INSERT IGNORE INTO `config`
            (`field`, `value`, `type`, `range`,
            `section`, `mkdate`, `chdate`,
            `description`)
            VALUES
            ('SHOW_FOLDER_SIZE', '1', 'boolean', 'global',
            'files', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(),
            'SHOW_FOLDER_SIZE gibt an, ob die Anzahl der Objekte (Dateien und Unterordner) in einem Ordner angezeigt werden sollen.')"
        );
    }

    protected function down()
    {
        DBManager::get()->exec(
            "DELETE FROM `config_values` WHERE `field` = 'SHOW_FOLDER_SIZE'"
        );
    }
}