<?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 Version20241028104114 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add created by manager to campaign';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE campaign ADD created_by_manager_id BIGINT UNSIGNED DEFAULT NULL');
$this->addSql('ALTER TABLE campaign ADD CONSTRAINT FK_1F1512DD4B672C83 FOREIGN KEY (created_by_manager_id) REFERENCES manager (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE campaign DROP FOREIGN KEY FK_1F1512DD4B672C83');
$this->addSql('ALTER TABLE campaign DROP created_by_manager_id');
}
}