<?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 Version20220504161026 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 provider_request ADD provider_type_id INT DEFAULT NULL, ADD provider_territory_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE provider_request ADD CONSTRAINT FK_CBCF2D3835142E34 FOREIGN KEY (provider_type_id) REFERENCES provider_type (id)');
$this->addSql('ALTER TABLE provider_request ADD CONSTRAINT FK_CBCF2D3820814669 FOREIGN KEY (provider_territory_id) REFERENCES territory (id)');
$this->addSql('CREATE INDEX IDX_CBCF2D3835142E34 ON provider_request (provider_type_id)');
$this->addSql('CREATE INDEX IDX_CBCF2D3820814669 ON provider_request (provider_territory_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE provider_request DROP FOREIGN KEY FK_CBCF2D3835142E34');
$this->addSql('ALTER TABLE provider_request DROP FOREIGN KEY FK_CBCF2D3820814669');
$this->addSql('DROP INDEX IDX_CBCF2D3835142E34 ON provider_request');
$this->addSql('DROP INDEX IDX_CBCF2D3820814669 ON provider_request');
$this->addSql('ALTER TABLE provider_request DROP provider_type_id, DROP provider_territory_id');
}
}