<?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 Version20231219221541 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 UNIQ_8D93D649A0D96FBF ON user');
$this->addSql('DROP INDEX UNIQ_8D93D64992FC23A8 ON user');
$this->addSql('ALTER TABLE user ADD newPassword VARCHAR(255) DEFAULT NULL, ADD type VARCHAR(30) DEFAULT NULL, ADD photo LONGTEXT DEFAULT NULL, ADD reset_password_token VARCHAR(255) DEFAULT NULL, ADD reset_password_token_expires_at DATETIME DEFAULT NULL, DROP username, DROP username_canonical, DROP email_canonical, CHANGE email email VARCHAR(180) DEFAULT NULL, CHANGE enabled enabled TINYINT(1) DEFAULT NULL, CHANGE salt salt VARCHAR(1000) DEFAULT NULL, CHANGE password password VARCHAR(255) DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE user ADD username VARCHAR(180) NOT NULL, ADD username_canonical VARCHAR(180) NOT NULL, ADD email_canonical VARCHAR(180) NOT NULL, DROP newPassword, DROP type, DROP photo, DROP reset_password_token, DROP reset_password_token_expires_at, CHANGE email email VARCHAR(180) NOT NULL, CHANGE salt salt VARCHAR(255) DEFAULT NULL, CHANGE password password VARCHAR(255) NOT NULL, CHANGE enabled enabled TINYINT(1) NOT NULL');
$this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649A0D96FBF ON user (email_canonical)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D64992FC23A8 ON user (username_canonical)');
}
}