refactor(backend): drop the legacy products.printer_zone_id and its print fallbacks

Routing has been by prep zone only since v1, which nulled this column on every start, so the four fallbacks in printer_service.py never ran. Revision 0012 drops the column (its unnamed FK goes with the batch rebuild). The unused legacy GET /api/kds/items keeps its single 'no zone' group. Product create/update/export/import no longer mention it. Scheduled in plan step 1.0 for the catalogue rework (1.13).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-13 12:28:13 +02:00
co-authored by Claude Opus 5.5
parent 82c6ca4e0a
commit 3c5751025c
8 changed files with 37 additions and 57 deletions
-1
View File
@@ -16,7 +16,6 @@ class Printer(Base):
duplicates = Column(Integer, default=0, nullable=False)
codepage_n = Column(Integer, default=29, nullable=False)
products = relationship("Product", back_populates="printer_zone")
print_logs = relationship("PrintLog", back_populates="printer")
print_jobs = relationship("PrintJob", back_populates="printer")
prep_zones = relationship("PrepZone", secondary="prep_zone_printers", back_populates="printers")
-2
View File
@@ -33,7 +33,6 @@ class Product(Base):
is_available = Column(Boolean, default=True, nullable=False)
# "active" | "archived" — archived products are kept for order history but hidden from active use
lifecycle_status = Column(String, default="active", nullable=False)
printer_zone_id = Column(Integer, ForeignKey("printers.id"), nullable=True)
image_url = Column(String, nullable=True)
sort_order = Column(Integer, default=0, nullable=False)
@@ -70,7 +69,6 @@ class Product(Base):
fiscal_vat_group_id = Column(Integer, nullable=True) # machine VAT group ID (1-based integer)
category = relationship("Category", back_populates="products")
printer_zone = relationship("Printer", back_populates="products")
prep_zones = relationship("PrepZone", secondary="product_prep_zones", back_populates="products")
quick_options = relationship("ProductQuickOption", back_populates="product", cascade="all, delete-orphan")
options = relationship("ProductOption", back_populates="product", cascade="all, delete-orphan")