<?php
declare(strict_types=1);

return [
    'up' => "CREATE TABLE IF NOT EXISTS `facility_zone_trainees` (
    `id` BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    `zone_id` BIGINT UNSIGNED NOT NULL,
    `schedule_id` BIGINT UNSIGNED NULL,
    `player_id` BIGINT UNSIGNED NULL,
    `trainee_name` VARCHAR(300) NULL,
    `assigned_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `assigned_by` BIGINT UNSIGNED NULL,
    INDEX `idx_fzt_zone` (`zone_id`),
    INDEX `idx_fzt_player` (`player_id`),
    INDEX `idx_fzt_schedule` (`schedule_id`),
    CONSTRAINT `fk_fzt_zone` FOREIGN KEY (`zone_id`) REFERENCES `facility_grid_zones`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
    'down' => "DROP TABLE IF EXISTS `facility_zone_trainees`",
];
