<?php
declare(strict_types=1);

return [
    'up' => "ALTER TABLE `academy_schedules`
ADD COLUMN `coach_id` BIGINT UNSIGNED NULL AFTER `coach_name`,
ADD COLUMN `session_type` VARCHAR(20) NOT NULL DEFAULT 'group' COMMENT 'private, small_group, group, team' AFTER `coach_id`,
ADD INDEX `idx_as_coach` (`coach_id`),
ADD CONSTRAINT `fk_as_coach` FOREIGN KEY (`coach_id`) REFERENCES `coaches`(`id`) ON DELETE SET NULL",
    'down' => "ALTER TABLE `academy_schedules`
DROP FOREIGN KEY `fk_as_coach`,
DROP INDEX `idx_as_coach`,
DROP COLUMN `session_type`,
DROP COLUMN `coach_id`",
];
