<?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 Version20240423150420 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 `order` ADD ingevoerd_door_id INT DEFAULT NULL, ADD gewijzigd_door_id INT DEFAULT NULL, ADD ingevoerd_datum DATE DEFAULT NULL, ADD gewijzigd_datum DATE DEFAULT NULL');
$this->addSql('ALTER TABLE `order` ADD CONSTRAINT FK_F5299398C850BD12 FOREIGN KEY (ingevoerd_door_id) REFERENCES `user` (id)');
$this->addSql('ALTER TABLE `order` ADD CONSTRAINT FK_F5299398CCA33DFD FOREIGN KEY (gewijzigd_door_id) REFERENCES `user` (id)');
$this->addSql('CREATE INDEX IDX_F5299398C850BD12 ON `order` (ingevoerd_door_id)');
$this->addSql('CREATE INDEX IDX_F5299398CCA33DFD ON `order` (gewijzigd_door_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398C850BD12');
$this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398CCA33DFD');
$this->addSql('DROP INDEX IDX_F5299398C850BD12 ON `order`');
$this->addSql('DROP INDEX IDX_F5299398CCA33DFD ON `order`');
$this->addSql('ALTER TABLE `order` DROP ingevoerd_door_id, DROP gewijzigd_door_id, DROP ingevoerd_datum, DROP gewijzigd_datum');
}
}