<?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 Version20210611155524 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_username ON resource');
$this->addSql('ALTER TABLE resource ADD lastname VARCHAR(255) NOT NULL, ADD phone VARCHAR(255) NOT NULL, ADD gender TINYINT(1) NOT NULL, ADD age VARCHAR(255) NOT NULL, ADD country VARCHAR(255) NOT NULL, ADD accent VARCHAR(255) NOT NULL, ADD sample LONGTEXT NOT NULL, ADD tra LONGTEXT NOT NULL, CHANGE username firstname 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 resource ADD username VARCHAR(190) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, DROP firstname, DROP lastname, DROP phone, DROP gender, DROP age, DROP country, DROP accent, DROP sample, DROP tra');
$this->addSql('CREATE UNIQUE INDEX UNIQ_username ON resource (username)');
}
}