<?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 Version20260312104832 extends AbstractMigration
{
    public function getDescription(): string
    {
        return '';
    }

    public function up(Schema $schema): void
    {
        // this up() migration is auto-generated, please modify it to your needs
        $this->addSql('ALTER TABLE task_status DROP CONSTRAINT fk_40a9e1cf166d1f9c');
        $this->addSql('DROP INDEX idx_40a9e1cf166d1f9c');
        $this->addSql('ALTER TABLE task_status DROP project_id');
    }

    public function down(Schema $schema): void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->addSql('ALTER TABLE task_status ADD project_id INT NOT NULL');
        $this->addSql('ALTER TABLE task_status ADD CONSTRAINT fk_40a9e1cf166d1f9c FOREIGN KEY (project_id) REFERENCES project (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
        $this->addSql('CREATE INDEX idx_40a9e1cf166d1f9c ON task_status (project_id)');
    }
}
