<?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 Version20220601135507 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 registration ADD token_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE registration ADD CONSTRAINT FK_62A8A7A741DEE7B9 FOREIGN KEY (token_id) REFERENCES visio_event_promotion (id)');
$this->addSql('CREATE INDEX IDX_62A8A7A741DEE7B9 ON registration (token_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE registration DROP FOREIGN KEY FK_62A8A7A741DEE7B9');
$this->addSql('DROP INDEX IDX_62A8A7A741DEE7B9 ON registration');
$this->addSql('ALTER TABLE registration DROP token_id');
}
}