diff --git a/migrations/Version20260313125531.php b/migrations/Version20260313125531.php new file mode 100644 index 0000000..e74eb37 --- /dev/null +++ b/migrations/Version20260313125531.php @@ -0,0 +1,41 @@ +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'); + } +}