<?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 Version20241104090118 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 workshop DROP FOREIGN KEY FK_9B6F02C42F19F6AC');
$this->addSql('ALTER TABLE workshop DROP FOREIGN KEY FK_9B6F02C47A19A357');
$this->addSql('ALTER TABLE workshop ADD CONSTRAINT FK_9B6F02C42F19F6AC FOREIGN KEY (workshop_category_id) REFERENCES workshop_category (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE workshop ADD CONSTRAINT FK_9B6F02C47A19A357 FOREIGN KEY (contributor_id) REFERENCES contributor (id) ON DELETE SET NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE workshop DROP FOREIGN KEY FK_9B6F02C47A19A357');
$this->addSql('ALTER TABLE workshop DROP FOREIGN KEY FK_9B6F02C42F19F6AC');
$this->addSql('ALTER TABLE workshop ADD CONSTRAINT FK_9B6F02C47A19A357 FOREIGN KEY (contributor_id) REFERENCES contributor (id)');
$this->addSql('ALTER TABLE workshop ADD CONSTRAINT FK_9B6F02C42F19F6AC FOREIGN KEY (workshop_category_id) REFERENCES workshop_category (id)');
}
}