<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

final class Version20250521194035 extends AbstractMigration
{
    public function getDescription(): string
    {
        return '';
    }

    public function up(Schema $schema): void
    {
        $this->addSql(<<<'SQL'
            ALTER TABLE elimination ADD created TIMESTAMP(0) WITHOUT TIME ZONE
            SQL);
        $this->addSql(<<<'SQL'
            UPDATE elimination SET created = NOW()
            SQL
        );
        $this->addSql(<<<'SQL'
            ALTER TABLE elimination ALTER created SET NOT NULL
            SQL
        );
    }

    public function down(Schema $schema): void
    {
        $this->addSql(<<<'SQL'
            ALTER TABLE elimination DROP created
            SQL);
    }
}
