migrations/Version20230628080629.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 Version20230628080629 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 regie_update DROP INDEX FK_35AD68D271F7E88B, ADD UNIQUE INDEX UNIQ_35AD68D271F7E88B (event_id)');
$this->addSql('ALTER TABLE regie_update DROP FOREIGN KEY FK_35AD68D2896DBBDE');
$this->addSql('DROP INDEX fk_35ad68d2896dbbde ON regie_update');
$this->addSql('CREATE INDEX IDX_35AD68D2896DBBDE ON regie_update (updated_by_id)');
$this->addSql('ALTER TABLE regie_update ADD CONSTRAINT FK_35AD68D2896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE regie_update DROP INDEX UNIQ_35AD68D271F7E88B, ADD INDEX FK_35AD68D271F7E88B (event_id)');
$this->addSql('ALTER TABLE regie_update DROP FOREIGN KEY FK_35AD68D2896DBBDE');
$this->addSql('DROP INDEX idx_35ad68d2896dbbde ON regie_update');
$this->addSql('CREATE INDEX FK_35AD68D2896DBBDE ON regie_update (updated_by_id)');
$this->addSql('ALTER TABLE regie_update ADD CONSTRAINT FK_35AD68D2896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
}
}