<?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 Version20240903145105 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('DROP INDEX idx_value ON code');
$this->addSql('ALTER TABLE code CHANGE value value VARCHAR(255) NOT NULL');
$this->addSql('DROP INDEX idx_reservation_token ON reservation');
$this->addSql('ALTER TABLE reservation CHANGE token token VARCHAR(255) NOT NULL');
$this->addSql('DROP INDEX idx_token_value ON token');
$this->addSql('ALTER TABLE token CHANGE value value VARCHAR(255) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE code CHANGE value value VARCHAR(64) DEFAULT NULL');
$this->addSql('CREATE INDEX idx_value ON code (value)');
$this->addSql('ALTER TABLE reservation CHANGE token token VARCHAR(64) DEFAULT NULL');
$this->addSql('CREATE INDEX idx_reservation_token ON reservation (token)');
$this->addSql('ALTER TABLE token CHANGE value value VARCHAR(64) DEFAULT NULL');
$this->addSql('CREATE INDEX idx_token_value ON token (value)');
}
}