<?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 Version20220210103446 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add auction_auto_bid_id in the auction_bid';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE auction_bid ADD auto_bid_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE auction_bid ADD CONSTRAINT FK_401A9C4367FEC843 FOREIGN KEY (auto_bid_id) REFERENCES auction_auto_bid (id)');
$this->addSql('CREATE INDEX IDX_401A9C4367FEC843 ON auction_bid (auto_bid_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE auction_bid DROP FOREIGN KEY FK_401A9C4367FEC843');
$this->addSql('DROP INDEX IDX_401A9C4367FEC843 ON auction_bid');
$this->addSql('ALTER TABLE auction_bid DROP auto_bid_id');
}
}