feat: per-order-line material override — override materials for individual renders

- Add `material_override` nullable column on OrderLine (DB migration)
- Line override takes priority over OutputType override
- PATCH /orders/{id}/lines/{id} endpoint to update material_override
- Inline dropdown on each order line in the OrderDetail page
- Amber background when override is active
- Same output type, different material per line — no need to create a new output type

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-14 14:33:00 +01:00
parent 7e57dba085
commit 9d6def84c1
7 changed files with 115 additions and 7 deletions
@@ -0,0 +1,30 @@
"""add material_override to order_lines
Revision ID: 42b686e71c47
Revises: cfcc7ad1e7d5
Create Date: 2026-03-14 13:30:03.046793
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = '42b686e71c47'
down_revision: Union[str, None] = 'cfcc7ad1e7d5'
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('order_lines', sa.Column('material_override', sa.String(length=200), nullable=True))
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('order_lines', 'material_override')
# ### end Alembic commands ###