<?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 Version20260122092253 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 devis DROP CONSTRAINT fk_8b27c52b3adb05f1');
        $this->addSql('DROP INDEX idx_8b27c52b3adb05f1');
        $this->addSql('ALTER TABLE devis DROP options_id');
    }

    public function down(Schema $schema): void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->addSql('CREATE SCHEMA public');
        $this->addSql('ALTER TABLE devis ADD options_id INT DEFAULT NULL');
        $this->addSql('ALTER TABLE devis ADD CONSTRAINT fk_8b27c52b3adb05f1 FOREIGN KEY (options_id) REFERENCES options (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
        $this->addSql('CREATE INDEX idx_8b27c52b3adb05f1 ON devis (options_id)');
    }
}
