<?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 Version20220119124444 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 history_send ADD client_id UUID NOT NULL');
$this->addSql('ALTER TABLE history_send ADD old_recipient VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE history_send ADD new_recipient VARCHAR(255) NOT NULL');
$this->addSql('COMMENT ON COLUMN history_send.client_id IS \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE history_send ADD CONSTRAINT FK_AC464AB119EB6921 FOREIGN KEY (client_id) REFERENCES widget_user (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_AC464AB119EB6921 ON history_send (client_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE history_send DROP CONSTRAINT FK_AC464AB119EB6921');
$this->addSql('DROP INDEX IDX_AC464AB119EB6921');
$this->addSql('ALTER TABLE history_send DROP client_id');
$this->addSql('ALTER TABLE history_send DROP old_recipient');
$this->addSql('ALTER TABLE history_send DROP new_recipient');
}
}