<?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 Version20240129072627 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 user_ads DROP FOREIGN KEY FK_95DF97AB58420761');
$this->addSql('DROP INDEX IDX_95DF97AB58420761 ON user_ads');
$this->addSql('ALTER TABLE user_ads ADD geographic_zone INT NOT NULL, DROP geographic_zone_id');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE user_ads ADD geographic_zone_id INT DEFAULT NULL, DROP geographic_zone');
$this->addSql('ALTER TABLE user_ads ADD CONSTRAINT FK_95DF97AB58420761 FOREIGN KEY (geographic_zone_id) REFERENCES geographic_zone (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('CREATE INDEX IDX_95DF97AB58420761 ON user_ads (geographic_zone_id)');
}
}