blob: 97709fbd04a79414a6b355327405b7537dbaf0c7 (
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
|
<?php
/**
* @see https://gitlab.studip.de/studip/studip/-/issues/6153
*/
final class FixWikiConfigs extends Migration
{
public function description()
{
return 'Converts the wiki configurations WIKI_CREATE_PERMISSION and WIKI_RENAME_PERMISSION to range configurations';
}
public function up()
{
$query = "UPDATE `config`
SET `range` = 'range'
WHERE `field` IN('WIKI_CREATE_PERMISSION', 'WIKI_RENAME_PERMISSION')";
DBManager::get()->exec($query);
}
public function down()
{
$query = "UPDATE `config`
SET `range` = 'course'
WHERE `field` IN('WIKI_CREATE_PERMISSION', 'WIKI_RENAME_PERMISSION')";
DBManager::get()->exec($query);
}
}
|