<?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 Version20240513113155 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 leads__leads ADD order_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE leads__leads ADD CONSTRAINT FK_938C653A8D9F6D38 FOREIGN KEY (order_id) REFERENCES orders__orders (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_938C653A8D9F6D38 ON leads__leads (order_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE leads__leads DROP FOREIGN KEY FK_938C653A8D9F6D38');
$this->addSql('DROP INDEX UNIQ_938C653A8D9F6D38 ON leads__leads');
$this->addSql('ALTER TABLE leads__leads DROP order_id');
}
}