<?php
declare(strict_types=1);

return [
    'up' => "
        ALTER TABLE sa_pool_zone_templates ADD COLUMN recurrence_type VARCHAR(20) NOT NULL DEFAULT 'weekly' COMMENT 'daily, weekly, biweekly, monthly, custom' AFTER color;
        ALTER TABLE sa_pool_zone_templates ADD COLUMN recurrence_config JSON NULL COMMENT 'Config for custom patterns' AFTER recurrence_type;
        ALTER TABLE sa_pool_zone_template_entries ADD COLUMN day_interval INT UNSIGNED NULL DEFAULT NULL COMMENT 'For biweekly/custom: repeat every N days' AFTER day_of_week;
        ALTER TABLE sa_pool_zone_template_entries ADD COLUMN month_day TINYINT UNSIGNED NULL DEFAULT NULL COMMENT 'For monthly: day of month' AFTER day_interval;
    ",
    'down' => "
        ALTER TABLE sa_pool_zone_templates DROP COLUMN recurrence_type;
        ALTER TABLE sa_pool_zone_templates DROP COLUMN recurrence_config;
        ALTER TABLE sa_pool_zone_template_entries DROP COLUMN day_interval;
        ALTER TABLE sa_pool_zone_template_entries DROP COLUMN month_day;
    ",
];
