<?php

declare(strict_types=1);

namespace DoctrineMigrations;

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

/**
 * Absence management: track the last accrued month on absence_balance to make
 * the monthly paid-leave accrual idempotent.
 */
final class Version20260521160000 extends AbstractMigration
{
    public function getDescription(): string
    {
        return 'Add last_accrued_month to absence_balance';
    }

    public function up(Schema $schema): void
    {
        $this->addSql('ALTER TABLE absence_balance ADD last_accrued_month VARCHAR(7) DEFAULT NULL');
    }

    public function down(Schema $schema): void
    {
        $this->addSql('ALTER TABLE absence_balance DROP last_accrued_month');
    }
}
