<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20230807202055 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE lot_move ADD user_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE lot_move ADD CONSTRAINT FK_7B12A938A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_7B12A938A76ED395 ON lot_move (user_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE lot_move DROP FOREIGN KEY FK_7B12A938A76ED395');
$this->addSql('DROP INDEX IDX_7B12A938A76ED395 ON lot_move');
$this->addSql('ALTER TABLE lot_move DROP user_id');
}
}