<?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 Version20220114093527 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 DROP CONSTRAINT fk_ac464ab1fcdaeaaa');
$this->addSql('DROP INDEX idx_ac464ab1fcdaeaaa');
$this->addSql('ALTER TABLE history_send RENAME COLUMN order_id_id TO order_id');
$this->addSql('ALTER TABLE history_send ADD CONSTRAINT FK_AC464AB18D9F6D38 FOREIGN KEY (order_id) REFERENCES "order" (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_AC464AB18D9F6D38 ON history_send (order_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_AC464AB18D9F6D38');
$this->addSql('DROP INDEX IDX_AC464AB18D9F6D38');
$this->addSql('ALTER TABLE history_send RENAME COLUMN order_id TO order_id_id');
$this->addSql('ALTER TABLE history_send ADD CONSTRAINT fk_ac464ab1fcdaeaaa FOREIGN KEY (order_id_id) REFERENCES "order" (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX idx_ac464ab1fcdaeaaa ON history_send (order_id_id)');
}
}