<?php

declare(strict_types=1);

namespace DoctrineMigrations;

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

final class Version20260504000001 extends AbstractMigration
{
    public function getDescription(): string
    {
        return 'Collapse portrait_left / portrait_right into a single portrait orientation (ribbon always on left)';
    }

    public function up(Schema $schema): void
    {
        $this->addSql("UPDATE device SET orientation = 'portrait' WHERE orientation IN ('portrait_left', 'portrait_right')");
    }

    public function down(Schema $schema): void
    {
        $this->addSql("UPDATE device SET orientation = 'portrait_left' WHERE orientation = 'portrait'");
    }
}
