<?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 Version20260119103900 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 ADD address_ship_id INT DEFAULT NULL');
        $this->addSql('ALTER TABLE devis ADD bill_address_id INT DEFAULT NULL');
        $this->addSql('ALTER TABLE devis ADD CONSTRAINT FK_8B27C52B99B3C6E5 FOREIGN KEY (address_ship_id) REFERENCES customer_address (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
        $this->addSql('ALTER TABLE devis ADD CONSTRAINT FK_8B27C52B5B8A2B31 FOREIGN KEY (bill_address_id) REFERENCES customer_address (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
        $this->addSql('CREATE INDEX IDX_8B27C52B99B3C6E5 ON devis (address_ship_id)');
        $this->addSql('CREATE INDEX IDX_8B27C52B5B8A2B31 ON devis (bill_address_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 DROP CONSTRAINT FK_8B27C52B99B3C6E5');
        $this->addSql('ALTER TABLE devis DROP CONSTRAINT FK_8B27C52B5B8A2B31');
        $this->addSql('DROP INDEX IDX_8B27C52B99B3C6E5');
        $this->addSql('DROP INDEX IDX_8B27C52B5B8A2B31');
        $this->addSql('ALTER TABLE devis DROP address_ship_id');
        $this->addSql('ALTER TABLE devis DROP bill_address_id');
    }
}
