42 lines
1.6 KiB
PHP
42 lines
1.6 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 Version20260313125531 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 gitea_configuration (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, url VARCHAR(255) DEFAULT NULL, encrypted_token TEXT DEFAULT NULL, PRIMARY KEY (id))');
|
|
$this->addSql('ALTER TABLE project ADD gitea_owner VARCHAR(255) DEFAULT NULL');
|
|
$this->addSql('ALTER TABLE project ADD gitea_repo VARCHAR(255) DEFAULT NULL');
|
|
$this->addSql('ALTER TABLE task ALTER archived DROP DEFAULT');
|
|
$this->addSql('ALTER TABLE task_group ALTER archived DROP DEFAULT');
|
|
$this->addSql('ALTER TABLE task_status ALTER is_final DROP DEFAULT');
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
// this down() migration is auto-generated, please modify it to your needs
|
|
$this->addSql('DROP TABLE gitea_configuration');
|
|
$this->addSql('ALTER TABLE project DROP gitea_owner');
|
|
$this->addSql('ALTER TABLE project DROP gitea_repo');
|
|
$this->addSql('ALTER TABLE task ALTER archived SET DEFAULT false');
|
|
$this->addSql('ALTER TABLE task_group ALTER archived SET DEFAULT false');
|
|
$this->addSql('ALTER TABLE task_status ALTER is_final SET DEFAULT false');
|
|
}
|
|
}
|