<?php

declare(strict_types=1);

namespace DoctrineMigrations;

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

/**
 * Auto-generated Migration: Please modify to your needs!
 */
final class Version20260717082805 extends AbstractMigration
{
    public function getDescription(): string
    {
        return 'Switch discount_rules target reference columns from int id to uuid';
    }

    public function up(Schema $schema): void
    {
        $this->addSql('ALTER TABLE discount_rules ADD target_tag_uuid VARCHAR(36) DEFAULT NULL, ADD target_record_uuid VARCHAR(36) DEFAULT NULL, ADD target_service_item_uuid VARCHAR(36) DEFAULT NULL, DROP target_tag_id, DROP target_record_id, DROP target_service_item_id');
    }

    public function down(Schema $schema): void
    {
        $this->addSql('ALTER TABLE discount_rules ADD target_tag_id INT DEFAULT NULL, ADD target_record_id INT DEFAULT NULL, ADD target_service_item_id INT DEFAULT NULL, DROP target_tag_uuid, DROP target_record_uuid, DROP target_service_item_uuid');
    }
}
