feat: push product images to cloud for the QR menu
local_backend now uploads each product's image file to cloud_backend during the existing ~5 min menu sync, so the QR menu can show real photos without needing a manually-set digital_image_url. Only re-uploads images whose content hash changed since the last push (Product.cloud_image_hash), to avoid re-sending unchanged binaries every cycle. Also adds a manual "sync now" trigger (POST /api/system/sync-menu) and a matching button in Settings → Operation, for pushing menu/price/image changes immediately instead of waiting for the next automatic cycle. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -732,6 +732,8 @@ def _run_migrations():
|
||||
"ALTER TABLE product_preference_sets ADD COLUMN allow_multi_select INTEGER NOT NULL DEFAULT 0",
|
||||
# Per-choice quantity on multi-select preference sets (x2, x3, …)
|
||||
"ALTER TABLE product_preference_sets ADD COLUMN allow_choice_quantity INTEGER NOT NULL DEFAULT 0",
|
||||
# Tracks the hash of the product image last pushed to the cloud (Xenia Connect)
|
||||
"ALTER TABLE products ADD COLUMN cloud_image_hash VARCHAR",
|
||||
]
|
||||
for sql in migrations:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user