18d0db8a0c
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
31 lines
954 B
Python
31 lines
954 B
Python
"""recipe_tasks.vision_recipe_dir: cartella della ricetta VisionSuite v2 (#46)
|
|
|
|
Percorso relativo sotto upload_path della cartella immutabile che contiene
|
|
recipe.json e i file di meta (DXF, modelli .npz, ...).
|
|
|
|
Revision ID: 016_vision_recipe_dir
|
|
Revises: 015_api_key_hash
|
|
Create Date: 2026-10-07
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision: str = '016_vision_recipe_dir'
|
|
down_revision: Union[str, None] = '015_api_key_hash'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# batch: SQLite non sa fare DROP COLUMN nativo su tutte le versioni
|
|
with op.batch_alter_table('recipe_tasks') as batch:
|
|
batch.add_column(sa.Column('vision_recipe_dir', sa.String(500), nullable=True))
|
|
|
|
|
|
def downgrade() -> None:
|
|
with op.batch_alter_table('recipe_tasks') as batch:
|
|
batch.drop_column('vision_recipe_dir')
|