commit 7fe30bfebf
Author: Stef <stbuwalda@gmail.com>
Date: Mon Aug 11 14:32:53 2025 +0200
Improve FoodItem uniqueness and add name constraint
Refactored add_meal routes to check for existing FoodItems by name or barcode and improved form handling. Made barcode optional in FoodItemForm. Added a unique constraint on (name, owner_id) for FoodItem in both the model and database migrations, while retaining the (barcode, owner_id) constraint. Updated FoodItem relationship to cascade deletes.
Added Dockerfile and docker-compose.yaml for containerization. Introduced Alembic migrations with initial schema and a migration to alter column types. Added requirements.txt for dependencies and removed temp.py cleanup script. Updated .gitignore to allow tracking of migration files.
Add base Flask application with user authentication, SQLAlchemy models for users, units, and food items, admin blueprint, and basic templates. Includes database migration setup, login form, and seed script for initial user creation.