v0.24.0 — Garden: harvest→pantry, structured amounts, UW Extension links
Harvest logs now carry a structured amount+unit (legacy freeform quantity kept for old rows) and can simultaneously create a GARDEN-source pantry item via addPlantLog's new pantry input. PlantTypes can link a UW–Madison Extension article, searched through /api/v1/plant-types/uw-search (proxy to hort.extension.wisc.edu's WordPress REST API); the link shows on the type page and each plant. The garden log dialog now posts to /api/v1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "PlantLog" ADD COLUMN "amount" DECIMAL(10,2),
|
||||
ADD COLUMN "unit" TEXT;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "PlantType" ADD COLUMN "uwExtensionTitle" TEXT,
|
||||
ADD COLUMN "uwExtensionUrl" TEXT;
|
||||
@@ -195,6 +195,8 @@ model PlantType {
|
||||
edibleParts String? // "Fruit, young leaves"
|
||||
spacing String? // "10–15 ft", "18 in"
|
||||
imageUrl String?
|
||||
uwExtensionUrl String? // linked UW–Madison Extension article (hort.extension.wisc.edu)
|
||||
uwExtensionTitle String? // its title, shown as the link text
|
||||
notes String?
|
||||
active Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
@@ -282,7 +284,9 @@ model PlantLog {
|
||||
type PlantLogType
|
||||
date DateTime @default(now())
|
||||
notes String?
|
||||
quantity String? // freeform for harvests: "2 lbs", "1 gallon", "a big handful"
|
||||
quantity String? // legacy freeform harvests ("a big handful") — new logs use amount+unit
|
||||
amount Decimal? @db.Decimal(10, 2) // structured harvest quantity (queryable totals)
|
||||
unit String? // "lbs", "each", "quarts" — pairs with amount
|
||||
actorId String?
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user