- Added --env-file .env to all docker compose commands for consistent environment variable loading
- Added MISTRAL_API_KEY validation in deploy.sh with fatal error if missing
- Added --force-recreate flag to recipe-api restarts in disable/enable receipt trace scripts
- Added .env file existence check in rebuild_flutter.sh
- Added API service recreation logic in deploy.sh when backend/importer services are updated
- Remove deprecated --migrate flag and related RUN_MIGRATE logic
- Simplify database cleanup workflow to always run migrations before cleaning
- Add run_prisma_generate() function to update Prisma Client after migrations
- Update documentation to reflect new workflow where --clean-database implies migration
- Remove conditional migration logic that could cause double execution
- Add SKIP_MIGRATION environment variable to control automatic Prisma migrations in backend
- Update Dockerfile to conditionally run migrations based on SKIP_MIGRATION flag
- Enhance deploy.sh with:
- Better error handling using set -euo pipefail
- New --skip-migration flag to bypass automatic migration startup
- Improved documentation and help text
- New helper functions for waiting on services and database
- Better status reporting for migration results
- Update compose.yml to include SKIP_MIGRATION environment variable
Added new deployment options to deploy.sh:
- --migrate: Runs Prisma migration deploy command
- --clean-database: Executes maintenance SQL to clean data while preserving categories
Added new maintenance directory backend/prisma/maintenance/ containing:
- clean-database.sql: SQL script for database cleaning operations
Updated deployment script to:
- Include new command-line flags in help text
- Add conditional blocks for running migrations and database cleaning
- Implement container readiness checks before running Prisma commands
- Preserve existing seed functionality while adding new maintenance features