feat(workflow) : workflows de statuts par projet (kanban custom) #3

Merged
matthieu merged 26 commits from feat/project-workflows into develop 2026-05-20 07:44:10 +00:00
Showing only changes of commit 03f3c85fd8 - Show all commits

View File

@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260519175041 extends AbstractMigration
{
public function getDescription(): string
{
return 'Create workflow table and seed default Standard workflow';
}
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE workflow (
id SERIAL NOT NULL,
name VARCHAR(255) NOT NULL,
is_default BOOLEAN DEFAULT FALSE NOT NULL,
position INT DEFAULT 0 NOT NULL,
PRIMARY KEY (id)
)');
$this->addSql('CREATE UNIQUE INDEX uniq_workflow_name ON workflow (name)');
$this->addSql('CREATE UNIQUE INDEX uniq_workflow_one_default ON workflow (is_default) WHERE is_default = TRUE');
$this->addSql("INSERT INTO workflow (name, is_default, position) VALUES ('Standard', TRUE, 0)");
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE workflow');
}
}