<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

final class Version20260210120000 extends AbstractMigration
{
    public function getDescription(): string
    {
        return 'Add start/end half-day fields to absences';
    }

    public function up(Schema $schema): void
    {
        $this->addSql("ALTER TABLE absences ADD start_half VARCHAR(2) NOT NULL DEFAULT 'AM'");
        $this->addSql("ALTER TABLE absences ADD end_half VARCHAR(2) NOT NULL DEFAULT 'PM'");
    }

    public function down(Schema $schema): void
    {
        $this->addSql('ALTER TABLE absences DROP COLUMN start_half');
        $this->addSql('ALTER TABLE absences DROP COLUMN end_half');
    }
}
