<?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 Version20220804122158 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 customer_quotations ADD package_size_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE customer_quotations ADD CONSTRAINT FK_543D8A2CC6D6CDAB FOREIGN KEY (package_size_id) REFERENCES package_size (id)');
$this->addSql('CREATE INDEX IDX_543D8A2CC6D6CDAB ON customer_quotations (package_size_id)');
$this->addSql('ALTER TABLE price_list ADD package_size_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE price_list ADD CONSTRAINT FK_399A0AA2C6D6CDAB FOREIGN KEY (package_size_id) REFERENCES package_size (id)');
$this->addSql('CREATE INDEX IDX_399A0AA2C6D6CDAB ON price_list (package_size_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE customer_quotations DROP FOREIGN KEY FK_543D8A2CC6D6CDAB');
$this->addSql('DROP INDEX IDX_543D8A2CC6D6CDAB ON customer_quotations');
$this->addSql('ALTER TABLE customer_quotations DROP package_size_id');
$this->addSql('ALTER TABLE price_list DROP FOREIGN KEY FK_399A0AA2C6D6CDAB');
$this->addSql('DROP INDEX IDX_399A0AA2C6D6CDAB ON price_list');
$this->addSql('ALTER TABLE price_list DROP package_size_id');
}
}