do not auto publish workflow with observer (#1640)

This commit is contained in:
Shuchang Zheng
2025-01-25 04:08:51 +08:00
committed by GitHub
parent d41bae2383
commit 4db5906d04
10 changed files with 82 additions and 3 deletions

View File

@@ -0,0 +1,33 @@
"""Add status to workflow table
Revision ID: 26dc22efaf0b
Revises: 3a37869686bd
Create Date: 2025-01-24 20:03:14.509740+00:00
"""
from typing import Sequence, Union
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision: str = "26dc22efaf0b"
down_revision: Union[str, None] = "3a37869686bd"
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("workflows", sa.Column("status", sa.String(), nullable=True))
op.execute("UPDATE workflows SET status = 'published'")
op.alter_column("workflows", "status", nullable=False)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("workflows", "status")
# ### end Alembic commands ###