<?php
declare(strict_types=1);
namespace Application\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20191203081934 extends AbstractMigration
{
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE non_member_contract ADD staff_request_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE non_member_contract ADD CONSTRAINT FK_89BEA16FA42CA874 FOREIGN KEY (staff_request_id) REFERENCES legal_entity_staff_request (id)');
$this->addSql('CREATE INDEX IDX_89BEA16FA42CA874 ON non_member_contract (staff_request_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE non_member_contract DROP FOREIGN KEY FK_89BEA16FA42CA874');
$this->addSql('DROP INDEX IDX_89BEA16FA42CA874 ON non_member_contract');
$this->addSql('ALTER TABLE non_member_contract DROP staff_request_id');
}
}