<?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 Version20230926071150 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 bopartner_profile ADD header_picture_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE bopartner_profile ADD CONSTRAINT FK_48F3163C4C92AD88 FOREIGN KEY (header_picture_id) REFERENCES media__media (id)');
$this->addSql('CREATE INDEX IDX_48F3163C4C92AD88 ON bopartner_profile (header_picture_id)');
$this->addSql('ALTER TABLE company_profile ADD header_picture_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE company_profile ADD CONSTRAINT FK_A105B0D84C92AD88 FOREIGN KEY (header_picture_id) REFERENCES media__media (id)');
$this->addSql('CREATE INDEX IDX_A105B0D84C92AD88 ON company_profile (header_picture_id)');
$this->addSql('ALTER TABLE school_profile DROP INDEX UNIQ_13789897292E8AE2, ADD INDEX IDX_13789897292E8AE2 (profile_picture_id)');
$this->addSql('ALTER TABLE school_profile ADD header_picture_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE school_profile ADD CONSTRAINT FK_137898974C92AD88 FOREIGN KEY (header_picture_id) REFERENCES media__media (id)');
$this->addSql('CREATE INDEX IDX_137898974C92AD88 ON school_profile (header_picture_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE school_profile DROP INDEX IDX_13789897292E8AE2, ADD UNIQUE INDEX UNIQ_13789897292E8AE2 (profile_picture_id)');
$this->addSql('ALTER TABLE school_profile DROP FOREIGN KEY FK_137898974C92AD88');
$this->addSql('DROP INDEX IDX_137898974C92AD88 ON school_profile');
$this->addSql('ALTER TABLE school_profile DROP header_picture_id');
$this->addSql('ALTER TABLE bopartner_profile DROP FOREIGN KEY FK_48F3163C4C92AD88');
$this->addSql('DROP INDEX IDX_48F3163C4C92AD88 ON bopartner_profile');
$this->addSql('ALTER TABLE bopartner_profile DROP header_picture_id');
$this->addSql('ALTER TABLE company_profile DROP FOREIGN KEY FK_A105B0D84C92AD88');
$this->addSql('DROP INDEX IDX_A105B0D84C92AD88 ON company_profile');
$this->addSql('ALTER TABLE company_profile DROP header_picture_id');
}
}