<?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 Version20240709081150 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 road_occupation ADD occupation_type_id UUID DEFAULT NULL');
$this->addSql('ALTER TABLE road_occupation DROP occupation_type');
$this->addSql('COMMENT ON COLUMN road_occupation.occupation_type_id IS \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE road_occupation ADD CONSTRAINT FK_51453B6C2636E749 FOREIGN KEY (occupation_type_id) REFERENCES dict_road_occupation_type (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_51453B6C2636E749 ON road_occupation (occupation_type_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE road_occupation DROP CONSTRAINT FK_51453B6C2636E749');
$this->addSql('DROP INDEX IDX_51453B6C2636E749');
$this->addSql('ALTER TABLE road_occupation ADD occupation_type VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE road_occupation DROP occupation_type_id');
}
}