<?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 Version20230301014956 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 garbage_collection_garbage_bin DROP FOREIGN KEY FK_DFA025EC812C9976');
$this->addSql('ALTER TABLE garbage_collection_garbage_bin DROP FOREIGN KEY FK_DFA025ECF351FCBA');
$this->addSql('DROP TABLE garbage_collection_garbage_bin');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE garbage_collection_garbage_bin (garbage_collection_id INT NOT NULL, garbage_bin_id INT NOT NULL, INDEX IDX_DFA025EC812C9976 (garbage_collection_id), INDEX IDX_DFA025ECF351FCBA (garbage_bin_id), PRIMARY KEY(garbage_collection_id, garbage_bin_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE garbage_collection_garbage_bin ADD CONSTRAINT FK_DFA025EC812C9976 FOREIGN KEY (garbage_collection_id) REFERENCES garbage_collection (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE garbage_collection_garbage_bin ADD CONSTRAINT FK_DFA025ECF351FCBA FOREIGN KEY (garbage_bin_id) REFERENCES garbage_bin (id) ON DELETE CASCADE');
}
}