<?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 Version20260715120000 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 tariff ADD desktop_selection_image_id INT DEFAULT NULL, ADD mobile_selection_image_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE tariff ADD CONSTRAINT FK_TARIFF_DESKTOP_SELECTION_IMAGE FOREIGN KEY (desktop_selection_image_id) REFERENCES media__media (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE tariff ADD CONSTRAINT FK_TARIFF_MOBILE_SELECTION_IMAGE FOREIGN KEY (mobile_selection_image_id) REFERENCES media__media (id) ON DELETE SET NULL');
$this->addSql('CREATE INDEX IDX_TARIFF_DESKTOP_SELECTION_IMAGE ON tariff (desktop_selection_image_id)');
$this->addSql('CREATE INDEX IDX_TARIFF_MOBILE_SELECTION_IMAGE ON tariff (mobile_selection_image_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE tariff DROP FOREIGN KEY FK_TARIFF_DESKTOP_SELECTION_IMAGE');
$this->addSql('ALTER TABLE tariff DROP FOREIGN KEY FK_TARIFF_MOBILE_SELECTION_IMAGE');
$this->addSql('DROP INDEX IDX_TARIFF_DESKTOP_SELECTION_IMAGE ON tariff');
$this->addSql('DROP INDEX IDX_TARIFF_MOBILE_SELECTION_IMAGE ON tariff');
$this->addSql('ALTER TABLE tariff DROP desktop_selection_image_id, DROP mobile_selection_image_id');
}
}