<?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 Version20220412212650 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 exam_request ADD request_validation_by_id INT DEFAULT NULL, ADD validated_date DATETIME DEFAULT NULL, ADD validate_request_date DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE exam_request ADD CONSTRAINT FK_3631D6F72777A49A FOREIGN KEY (request_validation_by_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_3631D6F72777A49A ON exam_request (request_validation_by_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE exam_request DROP FOREIGN KEY FK_3631D6F72777A49A');
$this->addSql('DROP INDEX IDX_3631D6F72777A49A ON exam_request');
$this->addSql('ALTER TABLE exam_request DROP request_validation_by_id, DROP validated_date, DROP validate_request_date');
}
}