From f58d97fca34a299eddf82ad00a7dbd73cbe6a238 Mon Sep 17 00:00:00 2001 From: Dan Garner Date: Tue, 30 Apr 2024 13:09:22 +0100 Subject: [PATCH] Widget: fix Canvas module default duration. (#2511) xibosignageltd/xibo-private#672 --- ...30112500_canvas_duration_fix_migration.php | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 db/migrations/20240430112500_canvas_duration_fix_migration.php diff --git a/db/migrations/20240430112500_canvas_duration_fix_migration.php b/db/migrations/20240430112500_canvas_duration_fix_migration.php new file mode 100644 index 0000000000..a69cd0cf04 --- /dev/null +++ b/db/migrations/20240430112500_canvas_duration_fix_migration.php @@ -0,0 +1,37 @@ +. + */ + +use Phinx\Migration\AbstractMigration; + +/** + * Migration to fix the Canvas duration which mistakenly got added as 60s instead of 1s + * @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace + */ +class CanvasDurationFixMigration extends AbstractMigration +{ + public function change(): void + { + $this->execute('UPDATE `module` SET `defaultDuration` = 1, `enabled` = 1 WHERE `moduleId` = :moduleId', [ + 'moduleId' => 'core-canvas', + ]); + } +}