<?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 Version20250129091826 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 tree_to_remove_removal_reason (id UUID NOT NULL, tree_removal_reason_id UUID NOT NULL, tree_to_remove_id UUID NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_75A16383731244A4 ON tree_to_remove_removal_reason (tree_removal_reason_id)');
$this->addSql('CREATE INDEX IDX_75A16383CB20A8F9 ON tree_to_remove_removal_reason (tree_to_remove_id)');
$this->addSql('COMMENT ON COLUMN tree_to_remove_removal_reason.id IS \'(DC2Type:uuid)\'');
$this->addSql('COMMENT ON COLUMN tree_to_remove_removal_reason.tree_removal_reason_id IS \'(DC2Type:uuid)\'');
$this->addSql('COMMENT ON COLUMN tree_to_remove_removal_reason.tree_to_remove_id IS \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE tree_to_remove_removal_reason ADD CONSTRAINT FK_75A16383731244A4 FOREIGN KEY (tree_removal_reason_id) REFERENCES dict_tree_removal_reason (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE tree_to_remove_removal_reason ADD CONSTRAINT FK_75A16383CB20A8F9 FOREIGN KEY (tree_to_remove_id) REFERENCES tree_to_remove (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE tree_to_remove_removal_reason DROP CONSTRAINT FK_75A16383731244A4');
$this->addSql('ALTER TABLE tree_to_remove_removal_reason DROP CONSTRAINT FK_75A16383CB20A8F9');
$this->addSql('DROP TABLE tree_to_remove_removal_reason');
}
}