<?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 Version20230301015143 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 ADD garbage_bin_id INT NOT NULL');
$this->addSql('ALTER TABLE garbage_collection ADD CONSTRAINT FK_1E17EDBF351FCBA FOREIGN KEY (garbage_bin_id) REFERENCES garbage_bin (id)');
$this->addSql('CREATE INDEX IDX_1E17EDBF351FCBA ON garbage_collection (garbage_bin_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE garbage_collection DROP FOREIGN KEY FK_1E17EDBF351FCBA');
$this->addSql('DROP INDEX IDX_1E17EDBF351FCBA ON garbage_collection');
$this->addSql('ALTER TABLE garbage_collection DROP garbage_bin_id');
}
}