<?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 Version20240503085754 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 adherent ADD ccas_accepted TINYINT(1) DEFAULT \'0\' NOT NULL, ADD ccas_eligible TINYINT(1) DEFAULT \'0\' NOT NULL, ADD anonymous_token VARCHAR(36) DEFAULT NULL');
        $this->addSql('CREATE UNIQUE INDEX UNIQ_90D3F060FCE1E3BD ON adherent (anonymous_token)');
    }

    public function down(Schema $schema) : void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->addSql('DROP INDEX UNIQ_90D3F060FCE1E3BD ON adherent');
        $this->addSql('ALTER TABLE adherent DROP ccas_accepted, DROP ccas_eligible, DROP anonymous_token');
    }
}
