<?php

declare(strict_types=1);

namespace DoctrineMigrations;

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

final class Version20260315100100 extends AbstractMigration
{
    public function getDescription(): string
    {
        return 'Add driver-specific fields to work_hours';
    }

    public function up(Schema $schema): void
    {
        $this->addSql('ALTER TABLE work_hours ADD day_hours_minutes INTEGER DEFAULT NULL');
        $this->addSql('ALTER TABLE work_hours ADD night_hours_minutes INTEGER DEFAULT NULL');
        $this->addSql('ALTER TABLE work_hours ADD has_breakfast BOOLEAN DEFAULT FALSE NOT NULL');
        $this->addSql('ALTER TABLE work_hours ADD has_lunch BOOLEAN DEFAULT FALSE NOT NULL');
        $this->addSql('ALTER TABLE work_hours ADD has_overnight BOOLEAN DEFAULT FALSE NOT NULL');
    }

    public function down(Schema $schema): void
    {
        $this->addSql('ALTER TABLE work_hours DROP COLUMN day_hours_minutes');
        $this->addSql('ALTER TABLE work_hours DROP COLUMN night_hours_minutes');
        $this->addSql('ALTER TABLE work_hours DROP COLUMN has_breakfast');
        $this->addSql('ALTER TABLE work_hours DROP COLUMN has_lunch');
        $this->addSql('ALTER TABLE work_hours DROP COLUMN has_overnight');
    }
}
