<?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 Version20231215121132 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__orders ADD confirmed_date DATETIME DEFAULT NULL, ADD collected_date DATETIME DEFAULT NULL, ADD issued_date DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE products__items_transactions ADD order_element_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE products__items_transactions ADD CONSTRAINT FK_D9EFCC63ACC5D771 FOREIGN KEY (order_element_id) REFERENCES orders__elements (id) ON DELETE SET NULL');
$this->addSql('CREATE INDEX IDX_D9EFCC63ACC5D771 ON products__items_transactions (order_element_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE orders__orders DROP confirmed_date, DROP collected_date, DROP issued_date');
$this->addSql('ALTER TABLE products__items_transactions DROP FOREIGN KEY FK_D9EFCC63ACC5D771');
$this->addSql('DROP INDEX IDX_D9EFCC63ACC5D771 ON products__items_transactions');
$this->addSql('ALTER TABLE products__items_transactions DROP order_element_id');
}
}