Change barcode field from integer to string

Updated the barcode field in FoodItem model and form from integer to string to support barcodes with leading zeros or non-numeric values. Added validation to ensure barcode contains only digits. Updated seed data to use string barcodes.
This commit is contained in:
2025-07-08 11:06:03 +02:00
parent 5b378cad38
commit bb5b2e8bc7
3 changed files with 6 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ with app.app_context():
protein=5.5,
saturated_fat=10,
sugar=35,
barcode=2278012003502,
barcode="2278012003502",
)
)