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
|
<?php
class DisableArchiveSearch extends Migration
{
public function description()
{
return 'Adds a config to enable the archive search.';
}
public function up()
{
$db = DBManager::get();
$stmt = $db->prepare('INSERT INTO config (field, value, section, type, `range`, mkdate, chdate, description)
VALUES (:name, :value, :section, :type, :range, UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), :description)');
$stmt->execute([
'name' => 'ENABLE_ARCHIVE_SEARCH',
'section' => 'global',
'description' => 'Soll es eine Suche in dem alten Archiv geben?',
'range' => 'global',
'type' => 'boolean',
'value' => '0'
]);
$db->exec("ALTER TABLE `session_data` CHANGE COLUMN `val` `val` mediumblob NOT NULL"); //see #9106
}
public function down()
{
DBManager::get()->exec("DELETE config, config_values
FROM config
LEFT JOIN config_values USING (field)
WHERE field = 'ENABLE_ARCHIVE_SEARCH'");
}
}
|