<?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 Version20230522144309 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 installateur DROP FOREIGN KEY FK_B18C35419D86650F');
$this->addSql('DROP INDEX UNIQ_B18C35419D86650F ON installateur');
$this->addSql('ALTER TABLE installateur DROP user_id_id');
$this->addSql('ALTER TABLE obliges DROP FOREIGN KEY FK_235C0D279D86650F');
$this->addSql('DROP INDEX UNIQ_235C0D279D86650F ON obliges');
$this->addSql('ALTER TABLE obliges DROP user_id_id');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE installateur ADD user_id_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE installateur ADD CONSTRAINT FK_B18C35419D86650F FOREIGN KEY (user_id_id) REFERENCES user (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_B18C35419D86650F ON installateur (user_id_id)');
$this->addSql('ALTER TABLE obliges ADD user_id_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE obliges ADD CONSTRAINT FK_235C0D279D86650F FOREIGN KEY (user_id_id) REFERENCES user (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_235C0D279D86650F ON obliges (user_id_id)');
}
}