Public Access
fix(migration): simplify aisle migration + add persistent backup script
- Drop the empty batch_alter_table block and the meaningless set_config call from migration 0015. Temp tables still persist for the migration's session (Alembic's transactional_ddl). - New backend/scripts/persist_aisle_backup.sql creates public.ingredient_aisle_backup_0015 and public.grocery_item_aisle_backup_0015 permanent tables for operators who want a recoverable record beyond the migration. - Update Review/sprint2-verification.md, Review/ui-nielsen-audit.md and fix-ui-audit.md with the correct container-based deploy steps: docker compose exec db psql -U mealplanner -d mealplanner -f /dev/stdin < ...sql. Host psql is not available on the deployment host; the db runs inside the container.
This commit is contained in:
@@ -30,13 +30,23 @@ The app looks polished on the surface (Tailwind palette, clean cards, working to
|
||||
> - **B11** Recipes filters: refactored to `pending`/`applied` state with explicit Apply / Reset buttons. `Filters` button shows active-count chip when filters are set. Wrapped in `role="region" aria-label="Filters"`.
|
||||
> - **S3.3** Shopping list stat cards: now `grid-cols-3` on all viewports with compact mobile sizing.
|
||||
>
|
||||
> Deployment command:
|
||||
> Deployment commands (run on the deployment host — DB is in a container, no host psql needed):
|
||||
> ```bash
|
||||
> # On the deployment host:
|
||||
> cd ~/MealPlanner
|
||||
> git pull
|
||||
> # Apply the backend migration (one-off):
|
||||
>
|
||||
> # Optional: persistent backup of aisle values BEFORE the migration
|
||||
> docker compose exec -T db psql -U mealplanner -d mealplanner \
|
||||
> -f /dev/stdin < backend/scripts/persist_aisle_backup.sql
|
||||
>
|
||||
> # Dry-run preview (no writes)
|
||||
> docker compose exec -T db psql -U mealplanner -d mealplanner \
|
||||
> -f /dev/stdin < backend/scripts/dry_run_aisle_migration.sql
|
||||
>
|
||||
> # Apply the migration
|
||||
> docker compose exec backend alembic upgrade head
|
||||
> # Rebuild & restart frontend:
|
||||
>
|
||||
> # Rebuild & restart frontend
|
||||
> docker compose -f docker-compose.yml up -d --build frontend
|
||||
> ```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user