<!-- .github/pull_request_template.md --> ## Description <!-- Provide a clear description of the changes in this PR --> ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin. --------- Signed-off-by: Diego B Theuerkauf <diego.theuerkauf@tuebingen.mpg.de> Co-authored-by: Igor Ilic <30923996+dexters1@users.noreply.github.com> Co-authored-by: Boris Arzentar <borisarzentar@gmail.com> Co-authored-by: Boris <boris@topoteretes.com> Co-authored-by: Igor Ilic <igorilic03@gmail.com> Co-authored-by: Hande <159312713+hande-k@users.noreply.github.com> Co-authored-by: Matea Pesic <80577904+matea16@users.noreply.github.com> Co-authored-by: hajdul88 <52442977+hajdul88@users.noreply.github.com> Co-authored-by: Daniel Molnar <soobrosa@gmail.com> Co-authored-by: Diego Baptista Theuerkauf <34717973+diegoabt@users.noreply.github.com> Co-authored-by: Dmitrii Galkin <36552323+dm1tryG@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: lxobr <122801072+lxobr@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
33 lines
889 B
Python
33 lines
889 B
Python
"""Add pipeline run status
|
|
|
|
Revision ID: 1d0bb7fede17
|
|
Revises: 482cd6517ce4
|
|
Create Date: 2025-05-19 10:58:15.993314
|
|
"""
|
|
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
|
|
from cognee.infrastructure.databases.relational.get_relational_engine import get_relational_engine
|
|
from cognee.modules.pipelines.models.PipelineRun import PipelineRun, PipelineRunStatus
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = "1d0bb7fede17"
|
|
down_revision: Union[str, None] = "482cd6517ce4"
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = "482cd6517ce4"
|
|
|
|
|
|
def upgrade() -> None:
|
|
db_engine = get_relational_engine()
|
|
|
|
if db_engine.engine.dialect.name == "postgresql":
|
|
op.execute(
|
|
"ALTER TYPE pipelinerunstatus ADD VALUE IF NOT EXISTS 'DATASET_PROCESSING_INITIATED'"
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
pass
|