<?php
declare(strict_types=1);

return [
    'up' => "
        ALTER TABLE sa_group_players ADD COLUMN medical_grace_deadline DATE NULL DEFAULT NULL COMMENT 'Deadline for submitting medical cert' AFTER status;
        INSERT INTO system_config (config_key, config_value, config_group, label_ar, field_type, created_at, updated_at)
        VALUES ('sa.medical_grace_days', '14', 'sports_activity', 'مهلة تقديم الشهادة الطبية (بالأيام)', 'number', NOW(), NOW())
        ON DUPLICATE KEY UPDATE config_key = config_key;
    ",
    'down' => "
        ALTER TABLE sa_group_players DROP COLUMN medical_grace_deadline;
        DELETE FROM system_config WHERE config_key = 'sa.medical_grace_days';
    ",
];
