A rich-but-all-optional reference record per kind of plant (care, sun, water, bloom & harvest windows, toxic-to-pets, edible parts, spacing), distinct from a specific planting or a group. - PlantType model + optional Plant.plantTypeId; migration + idempotent backfill that seeds 247 kinds from the built-in plant library and links plantings by species/common name (wired into the deploy entrypoint) - /api/plant-types CRUD; new "Plant types" section (browse by category, edit a kind, see every spot you've planted it) - New plants auto-link to their type on create; plant detail shows "More about…" - PlantType added to backup/restore; bump APP_VERSION 0.11.0 + changelog Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
21 lines
641 B
Bash
21 lines
641 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
echo "Waiting for Postgres to be ready..."
|
|
until nc -z postgres 5432 2>/dev/null; do
|
|
echo " Postgres not ready yet, retrying in 2s..."
|
|
sleep 2
|
|
done
|
|
echo "Postgres is ready."
|
|
|
|
echo "Running Prisma migrations..."
|
|
./node_modules/.bin/prisma migrate deploy
|
|
|
|
echo "Running Location-spine backfill (idempotent)..."
|
|
./node_modules/.bin/tsx prisma/scripts/backfill-locations.ts || echo " Backfill skipped/failed (non-fatal); check logs."
|
|
|
|
echo "Running plant-type backfill (idempotent)..."
|
|
./node_modules/.bin/tsx prisma/scripts/backfill-plant-types.ts || echo " Backfill skipped/failed (non-fatal); check logs."
|
|
|
|
exec "$@"
|