<?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 Version20250905172136 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 berth_docking_restriction DROP FOREIGN KEY FK_7E7BDA6F34832E6');
$this->addSql('ALTER TABLE berth_docking_restriction DROP FOREIGN KEY FK_7E7BDA6FDCBE9AAA');
$this->addSql('DROP TABLE berth_docking_restriction');
$this->addSql('ALTER TABLE berth CHANGE restriction_info_source restriction_info_source VARCHAR(191) DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE berth_docking_restriction (berth_id CHAR(36) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'(DC2Type:uuid)\', docking_restriction_id CHAR(36) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'(DC2Type:uuid)\', INDEX IDX_7E7BDA6F34832E6 (berth_id), INDEX IDX_7E7BDA6FDCBE9AAA (docking_restriction_id), PRIMARY KEY(berth_id, docking_restriction_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE berth_docking_restriction ADD CONSTRAINT FK_7E7BDA6F34832E6 FOREIGN KEY (berth_id) REFERENCES berth (id) ON UPDATE NO ACTION ON DELETE CASCADE');
$this->addSql('ALTER TABLE berth_docking_restriction ADD CONSTRAINT FK_7E7BDA6FDCBE9AAA FOREIGN KEY (docking_restriction_id) REFERENCES docking_restriction (id) ON UPDATE NO ACTION ON DELETE CASCADE');
$this->addSql('ALTER TABLE berth CHANGE restriction_info_source restriction_info_source VARCHAR(191) NOT NULL');
}
}