<?php

class Migration_20241218133747_default_schedule_calendar
{
    public static function up(PDO $pdo)
    {
        // Your migration code here
        $sql_add_column = "
            ALTER TABLE `calendar_added_events`
            ADD COLUMN `is_default` INT AFTER `borderColor`;
        ";
        $pdo->exec($sql_add_column);
        $sql_insert = "
         INSERT INTO calendar_added_events (
             title, start, end, backgroundColor, borderColor, allDay, is_default
         ) VALUES (
             '24/7', 'Wed Dec 11 2024 00:00:00 GMT+0500 (Pakistan Standard Time)', 'Thu Dec 19 2124 23:00:00 GMT+0500 (Pakistan Standard Time)', '#19692c', '#19692c', 'false', 1
         );
        "; 


        $pdo->exec($sql_insert);
    }

    public static function down(PDO $pdo)
    {
        // Rollback code here
    }
}
