<?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 Version20220916162017 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 agent ADD nationality_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE agent ADD cnss VARCHAR(100) DEFAULT NULL');
$this->addSql('ALTER TABLE agent ADD rc VARCHAR(100) DEFAULT NULL');
$this->addSql('ALTER TABLE agent ADD professional_status VARCHAR(100) DEFAULT NULL');
$this->addSql('ALTER TABLE agent ADD subject_to_vat BOOLEAN DEFAULT NULL');
$this->addSql('ALTER TABLE agent ADD CONSTRAINT FK_268B9C9D1C9DA55 FOREIGN KEY (nationality_id) REFERENCES nationality (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_268B9C9D1C9DA55 ON agent (nationality_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE agent DROP CONSTRAINT FK_268B9C9D1C9DA55');
$this->addSql('DROP INDEX IDX_268B9C9D1C9DA55');
$this->addSql('ALTER TABLE agent DROP nationality_id');
$this->addSql('ALTER TABLE agent DROP cnss');
$this->addSql('ALTER TABLE agent DROP rc');
$this->addSql('ALTER TABLE agent DROP professional_status');
$this->addSql('ALTER TABLE agent DROP subject_to_vat');
}
}