feat(backend) : add migration to remove project_id from task_status

This commit is contained in:
Matthieu
2026-03-12 11:48:43 +01:00
parent 5b8b4716df
commit df29214509

View File

@@ -0,0 +1,35 @@
<?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 Version20260312104832 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 task_status DROP CONSTRAINT fk_40a9e1cf166d1f9c');
$this->addSql('DROP INDEX idx_40a9e1cf166d1f9c');
$this->addSql('ALTER TABLE task_status DROP project_id');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE task_status ADD project_id INT NOT NULL');
$this->addSql('ALTER TABLE task_status ADD CONSTRAINT fk_40a9e1cf166d1f9c FOREIGN KEY (project_id) REFERENCES project (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX idx_40a9e1cf166d1f9c ON task_status (project_id)');
}
}