<?php

declare(strict_types=1);

namespace DoctrineMigrations;

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

/**
 * The insurance service kind a visit was billed as, snapshotted on the encounter and
 * on the invoice built from it.
 */
final class Version20260725132739 extends AbstractMigration
{
    public function getDescription(): string
    {
        return 'Add patient_sessions.insurance_service_category and invoices.service_category';
    }

    public function up(Schema $schema): void
    {
        $this->addSql('ALTER TABLE patient_sessions ADD insurance_service_category VARCHAR(30) DEFAULT NULL');
        $this->addSql('ALTER TABLE invoices ADD service_category VARCHAR(30) DEFAULT NULL');
    }

    public function down(Schema $schema): void
    {
        $this->addSql('ALTER TABLE patient_sessions DROP insurance_service_category');
        $this->addSql('ALTER TABLE invoices DROP service_category');
    }
}
