<?php
declare(strict_types=1);
namespace ProjectsBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20230822113847 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE projects_bundle__task_monitored (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', task_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', user_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', created_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', updated_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_B51FE17A8DB60186 (task_id), INDEX IDX_B51FE17AA76ED395 (user_id), INDEX IDX_B51FE17AB03A8386 (created_by_id), INDEX IDX_B51FE17A896DBBDE (updated_by_id), INDEX IDX_B51FE17AC76F1F52 (deleted_by_id), INDEX deleted_at (deleted_at), INDEX created_at (created_at), INDEX updated_at (updated_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE projects_bundle__task_monitored ADD CONSTRAINT FK_B51FE17A8DB60186 FOREIGN KEY (task_id) REFERENCES projects_bundle__task (id)');
$this->addSql('ALTER TABLE projects_bundle__task_monitored ADD CONSTRAINT FK_B51FE17AA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE projects_bundle__task_monitored ADD CONSTRAINT FK_B51FE17AB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE projects_bundle__task_monitored ADD CONSTRAINT FK_B51FE17A896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE projects_bundle__task_monitored ADD CONSTRAINT FK_B51FE17AC76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE projects_bundle__task_monitored DROP FOREIGN KEY FK_B51FE17A8DB60186');
$this->addSql('ALTER TABLE projects_bundle__task_monitored DROP FOREIGN KEY FK_B51FE17AA76ED395');
$this->addSql('ALTER TABLE projects_bundle__task_monitored DROP FOREIGN KEY FK_B51FE17AB03A8386');
$this->addSql('ALTER TABLE projects_bundle__task_monitored DROP FOREIGN KEY FK_B51FE17A896DBBDE');
$this->addSql('ALTER TABLE projects_bundle__task_monitored DROP FOREIGN KEY FK_B51FE17AC76F1F52');
$this->addSql('DROP TABLE projects_bundle__task_monitored');
}
}