<?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 Version20211120085444 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 person ADD kid_professional_profile_id INT DEFAULT NULL, CHANGE first_name first_name VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE person ADD CONSTRAINT FK_34DCD1764F365726 FOREIGN KEY (kid_professional_profile_id) REFERENCES professional_profile (id)');
$this->addSql('CREATE INDEX IDX_34DCD1764F365726 ON person (kid_professional_profile_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE person DROP FOREIGN KEY FK_34DCD1764F365726');
$this->addSql('DROP INDEX IDX_34DCD1764F365726 ON person');
$this->addSql('ALTER TABLE person DROP kid_professional_profile_id, CHANGE first_name first_name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
}
}