52 lines
3.2 KiB
PHP
52 lines
3.2 KiB
PHP
<?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 Version20260312165317 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 ADD archived BOOLEAN NOT NULL DEFAULT FALSE');
|
|
$this->addSql('ALTER TABLE task_task_type DROP CONSTRAINT fk_80470e038db60186');
|
|
$this->addSql('ALTER TABLE task_task_type DROP CONSTRAINT fk_80470e03daada679');
|
|
$this->addSql('ALTER TABLE task_task_type ADD CONSTRAINT FK_80470E038DB60186 FOREIGN KEY (task_id) REFERENCES task (id) NOT DEFERRABLE');
|
|
$this->addSql('ALTER TABLE task_task_type ADD CONSTRAINT FK_80470E03DAADA679 FOREIGN KEY (task_type_id) REFERENCES task_type (id) NOT DEFERRABLE');
|
|
$this->addSql('ALTER TABLE task_group ADD archived BOOLEAN NOT NULL DEFAULT FALSE');
|
|
$this->addSql('ALTER TABLE task_status ADD is_final BOOLEAN NOT NULL DEFAULT FALSE');
|
|
$this->addSql('ALTER TABLE time_entry_task_type DROP CONSTRAINT fk_be7a719d1eb30a8e');
|
|
$this->addSql('ALTER TABLE time_entry_task_type DROP CONSTRAINT fk_be7a719ddaada679');
|
|
$this->addSql('ALTER TABLE time_entry_task_type ADD CONSTRAINT FK_BE7A719D1EB30A8E FOREIGN KEY (time_entry_id) REFERENCES time_entry (id) NOT DEFERRABLE');
|
|
$this->addSql('ALTER TABLE time_entry_task_type ADD CONSTRAINT FK_BE7A719DDAADA679 FOREIGN KEY (task_type_id) REFERENCES task_type (id) NOT DEFERRABLE');
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
// this down() migration is auto-generated, please modify it to your needs
|
|
$this->addSql('ALTER TABLE task DROP archived');
|
|
$this->addSql('ALTER TABLE task_group DROP archived');
|
|
$this->addSql('ALTER TABLE task_status DROP is_final');
|
|
$this->addSql('ALTER TABLE task_task_type DROP CONSTRAINT FK_80470E038DB60186');
|
|
$this->addSql('ALTER TABLE task_task_type DROP CONSTRAINT FK_80470E03DAADA679');
|
|
$this->addSql('ALTER TABLE task_task_type ADD CONSTRAINT fk_80470e038db60186 FOREIGN KEY (task_id) REFERENCES task (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
$this->addSql('ALTER TABLE task_task_type ADD CONSTRAINT fk_80470e03daada679 FOREIGN KEY (task_type_id) REFERENCES task_type (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
$this->addSql('ALTER TABLE time_entry_task_type DROP CONSTRAINT FK_BE7A719D1EB30A8E');
|
|
$this->addSql('ALTER TABLE time_entry_task_type DROP CONSTRAINT FK_BE7A719DDAADA679');
|
|
$this->addSql('ALTER TABLE time_entry_task_type ADD CONSTRAINT fk_be7a719d1eb30a8e FOREIGN KEY (time_entry_id) REFERENCES time_entry (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
$this->addSql('ALTER TABLE time_entry_task_type ADD CONSTRAINT fk_be7a719ddaada679 FOREIGN KEY (task_type_id) REFERENCES task_type (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
}
|
|
}
|