<?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 Version20241002124729 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 orders ADD funnel_id INT DEFAULT NULL, CHANGE total_price_to_eur total_price_to_eur NUMERIC(10, 2) DEFAULT \'0\' NOT NULL, CHANGE total_price_ex_to_eur total_price_ex_to_eur NUMERIC(10, 2) DEFAULT \'0\' NOT NULL, CHANGE shipping_cost_to_eur shipping_cost_to_eur NUMERIC(10, 2) DEFAULT \'0\' NOT NULL');
$this->addSql('ALTER TABLE orders ADD CONSTRAINT FK_E52FFDEE7D958642 FOREIGN KEY (funnel_id) REFERENCES funnel (id)');
$this->addSql('CREATE INDEX IDX_E52FFDEE7D958642 ON orders (funnel_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE orders DROP FOREIGN KEY FK_E52FFDEE7D958642');
$this->addSql('DROP INDEX IDX_E52FFDEE7D958642 ON orders');
$this->addSql('ALTER TABLE orders DROP funnel_id');
}
}