<?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 Version20250210204826 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 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');
}
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('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_75a16383cb20a8f9 ON tree_to_remove_removal_reason (tree_to_remove_id)');
$this->addSql('CREATE INDEX idx_75a16383731244a4 ON tree_to_remove_removal_reason (tree_removal_reason_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');
}
}