<?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 Version20220329141809 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 client DROP INDEX UNIQ_C7440455A76ED395, ADD INDEX IDX_C7440455A76ED395 (user_id)');
$this->addSql('ALTER TABLE client ADD dtype VARCHAR(255) NOT NULL, ADD code VARCHAR(255) DEFAULT NULL');
$this->addSql('UPDATE client SET dtype = \'client\'');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE client DROP INDEX IDX_C7440455A76ED395, ADD UNIQUE INDEX UNIQ_C7440455A76ED395 (user_id)');
$this->addSql('ALTER TABLE client DROP dtype, DROP code');
}
}