<?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 Version20240708215757 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 ws_document ADD holder_id CHAR(36) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE ws_document ADD CONSTRAINT FK_B14013BFDEEE62D0 FOREIGN KEY (holder_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('CREATE INDEX IDX_B14013BFDEEE62D0 ON ws_document (holder_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE ws_document DROP FOREIGN KEY FK_B14013BFDEEE62D0');
$this->addSql('DROP INDEX IDX_B14013BFDEEE62D0 ON ws_document');
$this->addSql('ALTER TABLE ws_document DROP holder_id');
}
}