<?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 Version20210428112141 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 recipe DROP FOREIGN KEY FK_DA88B137405B99CF');
$this->addSql('DROP INDEX IDX_DA88B137405B99CF ON recipe');
$this->addSql('ALTER TABLE recipe CHANGE proyect_id project_id INT NOT NULL');
$this->addSql('ALTER TABLE recipe ADD CONSTRAINT FK_DA88B137166D1F9C FOREIGN KEY (project_id) REFERENCES project (id)');
$this->addSql('CREATE INDEX IDX_DA88B137166D1F9C ON recipe (project_id)');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE recipe DROP FOREIGN KEY FK_DA88B137166D1F9C');
$this->addSql('DROP INDEX IDX_DA88B137166D1F9C ON recipe');
$this->addSql('ALTER TABLE recipe CHANGE project_id proyect_id INT NOT NULL');
$this->addSql('ALTER TABLE recipe ADD CONSTRAINT FK_DA88B137405B99CF FOREIGN KEY (proyect_id) REFERENCES project (id)');
$this->addSql('CREATE INDEX IDX_DA88B137405B99CF ON recipe (proyect_id)');
}
}