<?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 Version20220408083527 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 product_out_request ADD validated_by_id INT DEFAULT NULL, ADD request_validation_by_id INT DEFAULT NULL, ADD validate_request_date DATETIME DEFAULT NULL, ADD validated_date DATETIME DEFAULT NULL, ADD slug VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE product_out_request ADD CONSTRAINT FK_93562083C69DE5E5 FOREIGN KEY (validated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE product_out_request ADD CONSTRAINT FK_935620832777A49A FOREIGN KEY (request_validation_by_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_93562083C69DE5E5 ON product_out_request (validated_by_id)');
$this->addSql('CREATE INDEX IDX_935620832777A49A ON product_out_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 product_out_request DROP FOREIGN KEY FK_93562083C69DE5E5');
$this->addSql('ALTER TABLE product_out_request DROP FOREIGN KEY FK_935620832777A49A');
$this->addSql('DROP INDEX IDX_93562083C69DE5E5 ON product_out_request');
$this->addSql('DROP INDEX IDX_935620832777A49A ON product_out_request');
$this->addSql('ALTER TABLE product_out_request DROP validated_by_id, DROP request_validation_by_id, DROP validate_request_date, DROP validated_date, DROP slug');
}
}