<?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 Version20240801130431 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 piece_jointe ADD piece_jointe_mere_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE piece_jointe ADD CONSTRAINT FK_AB5111D4CE4DBF3A FOREIGN KEY (piece_jointe_mere_id) REFERENCES piece_jointe (id)');
$this->addSql('CREATE INDEX IDX_AB5111D4CE4DBF3A ON piece_jointe (piece_jointe_mere_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE piece_jointe DROP FOREIGN KEY FK_AB5111D4CE4DBF3A');
$this->addSql('DROP INDEX IDX_AB5111D4CE4DBF3A ON piece_jointe');
$this->addSql('ALTER TABLE piece_jointe DROP piece_jointe_mere_id');
}
}