1217d8cef0
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 210h35m44s
CI/CD Pipeline / Frontend Lint (push) Failing after 210h36m11s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h36m17s
30 lines
707 B
Python
Executable File
30 lines
707 B
Python
Executable File
"""Add editing_mode to generation_tasks
|
|
|
|
Revision ID: 007
|
|
Revises: 006
|
|
Create Date: 2026-06-26
|
|
"""
|
|
|
|
import sqlalchemy as sa
|
|
|
|
from alembic import op
|
|
|
|
# revision identifiers
|
|
revision = "007"
|
|
down_revision = "006"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column(
|
|
"generation_tasks", sa.Column("editing_mode", sa.String(20), nullable=False, server_default="one_take")
|
|
)
|
|
# 添加索引以支持查询
|
|
op.create_index("ix_generation_tasks_editing_mode", "generation_tasks", ["editing_mode"])
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_index("ix_generation_tasks_editing_mode", table_name="generation_tasks")
|
|
op.drop_column("generation_tasks", "editing_mode")
|