<?php
declare(strict_types=1);

return [
    'up' => "
        ALTER TABLE `facility_time_slots`
            ADD COLUMN `access_type` VARCHAR(20) NOT NULL DEFAULT 'open' COMMENT 'open, members_only, vip' AFTER `is_active`,
            ADD COLUMN `member_price` DECIMAL(10,2) NULL AFTER `access_type`,
            ADD COLUMN `guest_price` DECIMAL(10,2) NULL AFTER `member_price`,
            ADD COLUMN `carnet_guest_price` DECIMAL(10,2) NULL AFTER `guest_price`,
            ADD INDEX `idx_fts_access` (`access_type`);

        ALTER TABLE `pool_bookings`
            ADD COLUMN `booker_member_id` BIGINT UNSIGNED NULL AFTER `booker_type`,
            ADD COLUMN `carnet_guest_entry_id` BIGINT UNSIGNED NULL AFTER `booker_member_id`
    ",
    'down' => "
        ALTER TABLE `pool_bookings`
            DROP COLUMN `carnet_guest_entry_id`,
            DROP COLUMN `booker_member_id`;
        ALTER TABLE `facility_time_slots`
            DROP INDEX `idx_fts_access`,
            DROP COLUMN `carnet_guest_price`,
            DROP COLUMN `guest_price`,
            DROP COLUMN `member_price`,
            DROP COLUMN `access_type`
    ",
];
