add workflow_run_id & workflow_run_block_id to script_blocks table (#3879)
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
"""add workflow_run_id & workflow_run_block_id to script_blocks table
|
||||||
|
|
||||||
|
Revision ID: 2903b6252f31
|
||||||
|
Revises: d135e472622c
|
||||||
|
Create Date: 2025-11-03 04:24:52.201400+00:00
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
from typing import Sequence, Union
|
||||||
|
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
from alembic import op
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision: str = "2903b6252f31"
|
||||||
|
down_revision: Union[str, None] = "d135e472622c"
|
||||||
|
branch_labels: Union[str, Sequence[str], None] = None
|
||||||
|
depends_on: Union[str, Sequence[str], None] = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade() -> None:
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.add_column("script_blocks", sa.Column("workflow_run_id", sa.String(), nullable=True))
|
||||||
|
op.add_column("script_blocks", sa.Column("workflow_run_block_id", sa.String(), nullable=True))
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade() -> None:
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.drop_column("script_blocks", "workflow_run_block_id")
|
||||||
|
op.drop_column("script_blocks", "workflow_run_id")
|
||||||
|
# ### end Alembic commands ###
|
||||||
@@ -975,6 +975,8 @@ class ScriptBlockModel(Base):
|
|||||||
script_block_label = Column(String, nullable=False)
|
script_block_label = Column(String, nullable=False)
|
||||||
script_file_id = Column(String, nullable=True)
|
script_file_id = Column(String, nullable=True)
|
||||||
run_signature = Column(String, nullable=True)
|
run_signature = Column(String, nullable=True)
|
||||||
|
workflow_run_id = Column(String, nullable=True)
|
||||||
|
workflow_run_block_id = Column(String, nullable=True)
|
||||||
|
|
||||||
created_at = Column(DateTime, default=datetime.datetime.utcnow, nullable=False)
|
created_at = Column(DateTime, default=datetime.datetime.utcnow, nullable=False)
|
||||||
modified_at = Column(DateTime, default=datetime.datetime.utcnow, onupdate=datetime.datetime.utcnow, nullable=False)
|
modified_at = Column(DateTime, default=datetime.datetime.utcnow, onupdate=datetime.datetime.utcnow, nullable=False)
|
||||||
|
|||||||
Reference in New Issue
Block a user