<?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 Version20230316095612 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 project ADD CONSTRAINT FK_2FB3D0EE38248176 FOREIGN KEY (currency_id) REFERENCES currency (id)');
$this->addSql('CREATE INDEX IDX_2FB3D0EE38248176 ON project (currency_id)');
$this->addSql('ALTER TABLE task ADD task_type_id INT NOT NULL');
$this->addSql('ALTER TABLE task ADD CONSTRAINT FK_527EDB2538248176 FOREIGN KEY (currency_id) REFERENCES currency (id)');
$this->addSql('ALTER TABLE task ADD CONSTRAINT FK_527EDB25DAADA679 FOREIGN KEY (task_type_id) REFERENCES task_type (id)');
$this->addSql('CREATE INDEX IDX_527EDB2538248176 ON task (currency_id)');
$this->addSql('CREATE INDEX IDX_527EDB25DAADA679 ON task (task_type_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE project DROP FOREIGN KEY FK_2FB3D0EE38248176');
$this->addSql('DROP INDEX IDX_2FB3D0EE38248176 ON project');
$this->addSql('ALTER TABLE task DROP FOREIGN KEY FK_527EDB2538248176');
$this->addSql('ALTER TABLE task DROP FOREIGN KEY FK_527EDB25DAADA679');
$this->addSql('DROP INDEX IDX_527EDB2538248176 ON task');
$this->addSql('DROP INDEX IDX_527EDB25DAADA679 ON task');
$this->addSql('ALTER TABLE task DROP task_type_id');
}
}