Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Emergency Alerts by default #2865

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
/*
* Copyright (C) 2025 Xibo Signage Ltd
*
* Xibo - Digital Signage - https://xibosignage.com
*
* This file is part of Xibo.
*
* Xibo is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* Xibo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
*/

use Phinx\Migration\AbstractMigration;

/**
* Add some additional fields to menu boards
* @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
*/
class UpsertCoreEmergencyAlertInModule extends AbstractMigration
{
public function change(): void
{
// Insert or update core-emergency-alert into the module table
$this->execute('
INSERT INTO `module` (`moduleId`, `enabled`, `previewEnabled`, `defaultDuration`, `settings`) VALUES
(\'core-emergency-alert\', \'1\', \'1\', \'60\', NULL)
ON DUPLICATE KEY UPDATE
`enabled` = VALUES(`enabled`),
nadzpogi marked this conversation as resolved.
Show resolved Hide resolved
`previewEnabled` = VALUES(`previewEnabled`),
`defaultDuration` = VALUES(`defaultDuration`),
`settings` = VALUES(`settings`);
');
}
}
Loading