migrations/Version20220115015851.php line 1
<?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 Version20220115015851 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_8D93D649E7927C74 ON user');
$this->addSql('DROP INDEX UNIQ_8D93D64976F5C865 ON user');
$this->addSql('ALTER TABLE user ADD google_account_google_id VARCHAR(255) NOT NULL, ADD google_account_avatar VARCHAR(255) DEFAULT NULL, ADD google_account_email VARCHAR(255) NOT NULL, ADD google_account_first_name VARCHAR(255) NOT NULL, ADD google_account_last_name VARCHAR(255) NOT NULL, DROP email, DROP first_name, DROP last_name, DROP google_id');
$this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649F97CC36E ON user (google_account_google_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649EB69BF47 ON user (google_account_email)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP INDEX UNIQ_8D93D649F97CC36E ON user');
$this->addSql('DROP INDEX UNIQ_8D93D649EB69BF47 ON user');
$this->addSql('ALTER TABLE user ADD email VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, ADD first_name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, ADD last_name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, ADD google_id VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, DROP google_account_google_id, DROP google_account_avatar, DROP google_account_email, DROP google_account_first_name, DROP google_account_last_name');
$this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649E7927C74 ON user (email)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D64976F5C865 ON user (google_id)');
}
}