<?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 Version20241009144807 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 funnel_visitor ADD funnel_step_id INT DEFAULT NULL, DROP page_type');
$this->addSql('ALTER TABLE funnel_visitor ADD CONSTRAINT FK_97A812E82EFFEDEB FOREIGN KEY (funnel_step_id) REFERENCES funnel_step (id) ON DELETE CASCADE');
$this->addSql('CREATE INDEX IDX_97A812E82EFFEDEB ON funnel_visitor (funnel_step_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE funnel_visitor DROP FOREIGN KEY FK_97A812E82EFFEDEB');
$this->addSql('DROP INDEX IDX_97A812E82EFFEDEB ON funnel_visitor');
$this->addSql('ALTER TABLE funnel_visitor ADD page_type VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, DROP funnel_step_id');
}
}