Files
Plenario/config/Migrations/20261111150000_AddIsHiddenToSlides.php
gnilebeinandClaude Opus 5.5 3c978e6f22
CI / Deploy / test (push) Successful in 57s
CI / Deploy / deploy (push) Skipped
Add hiding slides from the presentation
Hidden slides stay prepared in the dashboard but are skipped when
presenting (start, next/prev, goto), can not go live via embed and are
left out of the PDF export. Hiding the live or paused slide pauses the
poll like deleting it and resumes with the next visible slide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 15:25:41 +01:00

38 lines
866 B
PHP

<?php
declare(strict_types=1);
use Migrations\BaseMigration;
/**
* Hidden slides stay prepared in the dashboard but are skipped in the presentation,
* can not go live and are left out of the PDF export.
*/
class AddIsHiddenToSlides extends BaseMigration
{
/**
* @return void
*/
public function up(): void
{
$table = $this->table('slides');
if (!$table->hasColumn('is_hidden')) {
$table->addColumn('is_hidden', 'boolean', [
'null' => false,
'default' => false,
'after' => 'position',
])->update();
}
}
/**
* @return void
*/
public function down(): void
{
$table = $this->table('slides');
if ($table->hasColumn('is_hidden')) {
$table->removeColumn('is_hidden')->update();
}
}
}