Replace combined filament dropdown with separate material + color dropdowns
- app/constants.py: MATERIALS and COLORS standard value lists
- Migration 0008: job_material + job_color columns on print_jobs
- Job creation (both /jobs and /brackets/{id}/jobs) stores these independently
of the filament inventory
- All job tables updated to display job_material · job_color
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
26
alembic/versions/0008_job_material_color.py
Normal file
26
alembic/versions/0008_job_material_color.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""add job_material and job_color to print_jobs
|
||||
|
||||
Revision ID: 0008
|
||||
Revises: 0007
|
||||
Create Date: 2026-06-18
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision: str = "0008"
|
||||
down_revision: Union[str, None] = "0007"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column("print_jobs", sa.Column("job_material", sa.String(50), nullable=True))
|
||||
op.add_column("print_jobs", sa.Column("job_color", sa.String(100), nullable=True))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("print_jobs", "job_color")
|
||||
op.drop_column("print_jobs", "job_material")
|
||||
Reference in New Issue
Block a user