<?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 Version20241206103710 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 shipping_company ADD code VARCHAR(20) NOT NULL');
        $this->addSql('CREATE UNIQUE INDEX UNIQ_A9F70F8B77153098 ON shipping_company (code)');
        $this->addSql('ALTER TABLE vessel ADD code VARCHAR(20) NOT NULL');
        $this->addSql('CREATE UNIQUE INDEX UNIQ_4ED8DCA877153098 ON vessel (code)');
    }

    public function down(Schema $schema): void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->addSql('DROP INDEX UNIQ_4ED8DCA877153098 ON vessel');
        $this->addSql('ALTER TABLE vessel DROP code');
        $this->addSql('DROP INDEX UNIQ_A9F70F8B77153098 ON shipping_company');
        $this->addSql('ALTER TABLE shipping_company DROP code');
    }
}
