<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20170214122707 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE ocre ADD CONSTRAINT FK_2841C39314C9431B FOREIGN KEY (reign_id) REFERENCES reign (id)');
$this->addSql('ALTER TABLE ocre ADD CONSTRAINT FK_2841C393217BBB47 FOREIGN KEY (person_id) REFERENCES person (id)');
$this->addSql('ALTER TABLE ocre ADD CONSTRAINT FK_2841C3933A94E0C FOREIGN KEY (mint_id) REFERENCES mint (id)');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE ocre DROP FOREIGN KEY FK_2841C39314C9431B');
$this->addSql('ALTER TABLE ocre DROP FOREIGN KEY FK_2841C393217BBB47');
$this->addSql('ALTER TABLE ocre DROP FOREIGN KEY FK_2841C3933A94E0C');
}
}