aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/1.213_log_action_statusgroups.php
blob: be633a2700a11b2242200fc3e38356efbcc6fa7a (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
<?php
class LogActionStatusgroups extends Migration
{
    public function up()
    {
        DBManager::get()->exec("
            INSERT IGNORE INTO log_actions
            SET action_id = MD5('STATUSGROUP_ADD_USER'),
                name = 'STATUSGROUP_ADD_USER',
                description = 'Nutzer wird zu einer Statusgruppe hinzugefügt',
                info_template = '%user fügt %user(%affected) zur %group(%coaffected) hinzu.',
                active = '1',
                expires = '0'
        ");
        DBManager::get()->exec("
            INSERT IGNORE INTO log_actions
            SET action_id = MD5('STATUSGROUP_REMOVE_USER'),
                name = 'STATUSGROUP_REMOVE_USER',
                description = 'Nutzer wird aus einer Statusgruppe gelöscht',
                info_template = '%user entfernt %user(%affected) aus %group(%coaffected).',
                active = '1',
                expires = '0'
        ");
    }

    public function down()
    {
        DBManager::get()->exec("
            DELETE FROM log_actions WHERE action_id = MD5('STATUSGROUP_ADD_USER')
        ");
        DBManager::get()->exec("
            DELETE FROM log_actions WHERE action_id = MD5('STATUSGROUP_REMOVE_USER')
        ");
    }
}