<?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 Version20260116143611 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('CREATE TABLE devis_line (id SERIAL NOT NULL, devi_id INT DEFAULT NULL, pos INT NOT NULL, title VARCHAR(255) NOT NULL, content TEXT NOT NULL, price_ht DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))');
        $this->addSql('CREATE INDEX IDX_9EC6D529131098A5 ON devis_line (devi_id)');
        $this->addSql('ALTER TABLE devis_line ADD CONSTRAINT FK_9EC6D529131098A5 FOREIGN KEY (devi_id) REFERENCES devis (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
    }

    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_line DROP CONSTRAINT FK_9EC6D529131098A5');
        $this->addSql('DROP TABLE devis_line');
    }
}
