<?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 Version20230215192600 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 `order` ADD quote_request_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE `order` ADD CONSTRAINT FK_F5299398F229C21E FOREIGN KEY (quote_request_id) REFERENCES request (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_F5299398F229C21E ON `order` (quote_request_id)');
$this->addSql('ALTER TABLE temp_order ADD quote_request_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE temp_order ADD CONSTRAINT FK_63893299F229C21E FOREIGN KEY (quote_request_id) REFERENCES request (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_63893299F229C21E ON temp_order (quote_request_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398F229C21E');
$this->addSql('DROP INDEX UNIQ_F5299398F229C21E ON `order`');
$this->addSql('ALTER TABLE `order` DROP quote_request_id');
$this->addSql('ALTER TABLE temp_order DROP FOREIGN KEY FK_63893299F229C21E');
$this->addSql('DROP INDEX UNIQ_63893299F229C21E ON temp_order');
$this->addSql('ALTER TABLE temp_order DROP quote_request_id');
}
}