diff options
| author | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
|---|---|---|
| committer | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
| commit | 4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch) | |
| tree | 5c07151ae61276d334e88f6309c30d439a85c12e /db/migrations/6.0.9_notification_positioning.php | |
| parent | da0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff) | |
| parent | 97a188592c679890a25c37ab78463add76a52ff7 (diff) | |
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'db/migrations/6.0.9_notification_positioning.php')
| -rw-r--r-- | db/migrations/6.0.9_notification_positioning.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/db/migrations/6.0.9_notification_positioning.php b/db/migrations/6.0.9_notification_positioning.php new file mode 100644 index 0000000..d6693f3 --- /dev/null +++ b/db/migrations/6.0.9_notification_positioning.php @@ -0,0 +1,35 @@ +<?php +class NotificationPositioning extends Migration +{ + public function description() + { + return 'Adds a personal config option to select the on-screen position of system notifications'; + } + + protected function up() + { + DBManager::get()->execute( + "INSERT IGNORE INTO `config` VALUES (:field, :value, :type, :range, :section, UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), :desc)", + [ + 'field' => 'SYSTEM_NOTIFICATIONS_PLACEMENT', + 'value' => 'topcenter', + 'type' => 'string', + 'range' => 'user', + 'section' => '', + 'desc' => 'Wo sollen Systembenachrichtigungen im Fenster angezeigt werden? Gültige Werte sind "topcenter" und "bottomright"' + ] + ); + } + + protected function down() + { + DBManager::get()->execute( + "DELETE FROM `config_values` WHERE `field` = :field", + ['field' => 'SYSTEM_NOTIFICATIONS_PLACEMENT'] + ); + DBManager::get()->execute( + "DELETE FROM `config` WHERE `field` = :field", + ['field' => 'SYSTEM_NOTIFICATIONS_PLACEMENT'] + ); + } +}; |
