<?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 Version20211210151516 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('CREATE TABLE workflow_tasks (id INT AUTO_INCREMENT NOT NULL, workflow_id INT NOT NULL, type VARCHAR(50) NOT NULL, INDEX IDX_E11613A32C7C2CBA (workflow_id), INDEX id_index (id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE workflow_tasks ADD CONSTRAINT FK_E11613A32C7C2CBA FOREIGN KEY (workflow_id) REFERENCES workflows (id)');
$this->addSql('ALTER TABLE workflows ADD name VARCHAR(50) NOT NULL, ADD status TINYINT(1) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE workflow_tasks');
$this->addSql('ALTER TABLE workflows DROP name, DROP status');
}
}