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