Participants submit questions, upvote them and the presenter discusses them one by one, most upvoted first. - Stages collect -> vote -> discuss, switched manually by the presenter (V key or stepper, going back is possible) - Configurable upvote budget per participant, freely distributable (several upvotes on one question are allowed), votes can be withdrawn - Participants see all questions while collecting to avoid duplicates; no counts before the discussion - While discussing, next/prev step through the questions before moving to the next slide - Migration: slides.stage, slides.focus_response_id, responses.parent_id Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use Migrations\BaseMigration;
|
|
|
|
/**
|
|
* Q&A slides: participants submit questions, upvote them, the presenter
|
|
* discusses them one by one.
|
|
*
|
|
* slides.stage - Q&A stage: collect | vote | discuss (null = collect)
|
|
* slides.focus_response_id - Q&A: question currently being discussed
|
|
* responses.parent_id - Q&A upvote: the question (response) it supports
|
|
*/
|
|
class AddQaToSlides extends BaseMigration
|
|
{
|
|
/**
|
|
* @return void
|
|
*/
|
|
public function change(): void
|
|
{
|
|
$this->table('slides')
|
|
->addColumn('stage', 'string', ['limit' => 20, 'null' => true, 'default' => null, 'after' => 'voting_ends_at'])
|
|
->addColumn('focus_response_id', 'integer', ['null' => true, 'default' => null, 'after' => 'stage'])
|
|
->update();
|
|
|
|
$this->table('responses')
|
|
->addColumn('parent_id', 'integer', ['null' => true, 'default' => null, 'after' => 'numeric_value'])
|
|
->addIndex(['parent_id'])
|
|
->addForeignKey('parent_id', 'responses', 'id', ['delete' => 'CASCADE', 'update' => 'NO_ACTION'])
|
|
->update();
|
|
}
|
|
}
|