<?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 Version20190916183726 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->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE customer_rating_log ADD financial_user_id INT DEFAULT NULL, ADD processor_user_id INT DEFAULT NULL, ADD resolution_specialist_user_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE customer_rating_log ADD CONSTRAINT FK_6B2F51BEF5AD91FF FOREIGN KEY (financial_user_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE customer_rating_log ADD CONSTRAINT FK_6B2F51BE7CE2D2AC FOREIGN KEY (processor_user_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE customer_rating_log ADD CONSTRAINT FK_6B2F51BE596DDC89 FOREIGN KEY (resolution_specialist_user_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('CREATE INDEX IDX_6B2F51BEF5AD91FF ON customer_rating_log (financial_user_id)');
$this->addSql('CREATE INDEX IDX_6B2F51BE7CE2D2AC ON customer_rating_log (processor_user_id)');
$this->addSql('CREATE INDEX IDX_6B2F51BE596DDC89 ON customer_rating_log (resolution_specialist_user_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE customer_rating_log DROP FOREIGN KEY FK_6B2F51BEF5AD91FF');
$this->addSql('ALTER TABLE customer_rating_log DROP FOREIGN KEY FK_6B2F51BE7CE2D2AC');
$this->addSql('ALTER TABLE customer_rating_log DROP FOREIGN KEY FK_6B2F51BE596DDC89');
$this->addSql('DROP INDEX IDX_6B2F51BEF5AD91FF ON customer_rating_log');
$this->addSql('DROP INDEX IDX_6B2F51BE7CE2D2AC ON customer_rating_log');
$this->addSql('DROP INDEX IDX_6B2F51BE596DDC89 ON customer_rating_log');
$this->addSql('ALTER TABLE customer_rating_log DROP financial_user_id, DROP processor_user_id, DROP resolution_specialist_user_id');
}
}