<?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 Version20260122160120 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 customer ADD roles JSON DEFAULT NULL');
        $this->addSql('ALTER TABLE customer ADD password VARCHAR(255) DEFAULT NULL');
        $this->addSql('ALTER TABLE customer ADD is_account_configured BOOLEAN DEFAULT false NOT NULL');
        $this->addSql('ALTER TABLE customer ALTER email TYPE VARCHAR(180)');
        $this->addSql('CREATE UNIQUE INDEX UNIQ_81398E09E7927C74 ON customer (email)');
    }

    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('DROP INDEX UNIQ_81398E09E7927C74');
        $this->addSql('ALTER TABLE customer DROP roles');
        $this->addSql('ALTER TABLE customer DROP password');
        $this->addSql('ALTER TABLE customer DROP is_account_configured');
        $this->addSql('ALTER TABLE customer ALTER email TYPE VARCHAR(255)');
    }
}
