<?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 Version20240208210206 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 DROP FOREIGN KEY FK_527EDB256AE60DBB');
$this->addSql('ALTER TABLE task DROP FOREIGN KEY FK_527EDB25162CB942');
$this->addSql('DROP INDEX IDX_527EDB256AE60DBB ON task');
$this->addSql('DROP INDEX IDX_527EDB25162CB942 ON task');
$this->addSql('ALTER TABLE task DROP folder_id, DROP by_user_fonction_id, DROP estimated_time, DROP time_spent, DROP status, DROP all_users, CHANGE archive archive TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE time_slot CHANGE type type VARCHAR(50) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE task ADD folder_id INT NOT NULL, ADD by_user_fonction_id INT DEFAULT NULL, ADD estimated_time INT DEFAULT NULL, ADD time_spent INT NOT NULL, ADD status VARCHAR(255) DEFAULT NULL, ADD all_users TINYINT(1) NOT NULL, CHANGE archive archive TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE task ADD CONSTRAINT FK_527EDB256AE60DBB FOREIGN KEY (by_user_fonction_id) REFERENCES fonction (id)');
$this->addSql('ALTER TABLE task ADD CONSTRAINT FK_527EDB25162CB942 FOREIGN KEY (folder_id) REFERENCES folder (id)');
$this->addSql('CREATE INDEX IDX_527EDB256AE60DBB ON task (by_user_fonction_id)');
$this->addSql('CREATE INDEX IDX_527EDB25162CB942 ON task (folder_id)');
$this->addSql('ALTER TABLE time_slot CHANGE type type VARCHAR(255) DEFAULT NULL');
}
}