<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20230731220648 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE lot_move (id INT AUTO_INCREMENT NOT NULL, auction_from_id INT DEFAULT NULL, auction_to_id INT DEFAULT NULL, lot_id INT DEFAULT NULL, created DATETIME NOT NULL, INDEX IDX_7B12A93820DF06B6 (auction_from_id), INDEX IDX_7B12A9387F21D36C (auction_to_id), INDEX IDX_7B12A938A8CBA5F7 (lot_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE lot_move ADD CONSTRAINT FK_7B12A93820DF06B6 FOREIGN KEY (auction_from_id) REFERENCES auction (id)');
$this->addSql('ALTER TABLE lot_move ADD CONSTRAINT FK_7B12A9387F21D36C FOREIGN KEY (auction_to_id) REFERENCES auction (id)');
$this->addSql('ALTER TABLE lot_move ADD CONSTRAINT FK_7B12A938A8CBA5F7 FOREIGN KEY (lot_id) REFERENCES lot (id)');
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE lot_move');
}
}