<?php
declare(strict_types=1);

return [
    'up' => "
        ALTER TABLE `sa_group_players`
            ADD COLUMN `paused_months` JSON NULL COMMENT 'Array of YYYY-MM strings where subscription generation is skipped' AFTER `transfer_reason`;

        ALTER TABLE `sa_waitlist`
            ADD COLUMN `accepted_at` TIMESTAMP NULL AFTER `expires_at`;

        ALTER TABLE `sa_group_schedule`
            ADD INDEX `idx_sa_gs_unit_day_active` (`facility_unit_id`, `day_of_week`, `is_active`);
    ",
    'down' => "
        ALTER TABLE `sa_group_players` DROP COLUMN `paused_months`;

        ALTER TABLE `sa_waitlist` DROP COLUMN `accepted_at`;

        ALTER TABLE `sa_group_schedule` DROP INDEX `idx_sa_gs_unit_day_active`;
    ",
];
