<?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 Version20220329082118 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 project ADD phone_country_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE project ADD CONSTRAINT FK_2FB3D0EED124F8E5 FOREIGN KEY (phone_country_id) REFERENCES country (id)');
$this->addSql('CREATE INDEX IDX_2FB3D0EED124F8E5 ON project (phone_country_id)');
$this->addSql('ALTER TABLE scenario_project ADD phone_country_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE scenario_project ADD CONSTRAINT FK_307510EED124F8E5 FOREIGN KEY (phone_country_id) REFERENCES country (id)');
$this->addSql('CREATE INDEX IDX_307510EED124F8E5 ON scenario_project (phone_country_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE project DROP FOREIGN KEY FK_2FB3D0EED124F8E5');
$this->addSql('DROP INDEX IDX_2FB3D0EED124F8E5 ON project');
$this->addSql('ALTER TABLE project DROP phone_country_id');
$this->addSql('ALTER TABLE scenario_project DROP FOREIGN KEY FK_307510EED124F8E5');
$this->addSql('DROP INDEX IDX_307510EED124F8E5 ON scenario_project');
$this->addSql('ALTER TABLE scenario_project DROP phone_country_id');
}
}