<?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 Version20231226102430 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 history_send ADD order_item_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE history_send ADD updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
$this->addSql('ALTER TABLE history_send ADD send_type VARCHAR(50) DEFAULT NULL');
$this->addSql('ALTER TABLE history_send ADD external_id VARCHAR(50) DEFAULT NULL');
$this->addSql('ALTER TABLE history_send ADD service_status VARCHAR(50) DEFAULT NULL');
$this->addSql('COMMENT ON COLUMN history_send.updated_at IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('ALTER TABLE history_send ADD CONSTRAINT FK_AC464AB1E415FB15 FOREIGN KEY (order_item_id) REFERENCES order_item (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_AC464AB1E415FB15 ON history_send (order_item_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE history_send DROP CONSTRAINT FK_AC464AB1E415FB15');
$this->addSql('DROP INDEX IDX_AC464AB1E415FB15');
$this->addSql('ALTER TABLE history_send DROP order_item_id');
$this->addSql('ALTER TABLE history_send DROP updated_at');
$this->addSql('ALTER TABLE history_send DROP send_type');
$this->addSql('ALTER TABLE history_send DROP external_id');
$this->addSql('ALTER TABLE history_send DROP service_status');
}
}