Files
SpiceManagementSystem/app
Malek TellissiandClaude Sonnet 4.6 e187465553
Deploy / deploy (push) Successful in 14s
Fix syncSizes: replace belongsToMany sync with ProductSize updateOrCreate
belongsToMany sync() is wrong for products_sizes which is a full model
with its own id and a unique shopify_variant_id. The new approach:
- updateOrCreate per row (safe for repeated saves)
- strips non-digits from gtin, stores null when empty (fixes 500 on
  unsignedBigInteger column with empty string in strict SQL mode)
- only deletes local-only sizes (whereNull shopify_variant_id) that
  were removed — Shopify-imported sizes are never deleted here

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-12 17:00:58 +02:00
..
2026-09-11 01:17:47 +02:00
2026-09-11 01:17:47 +02:00
2026-09-11 01:17:47 +02:00