v0.6.0 — Kitchen: Pantry & Freezer inventory

This commit is contained in:
Bonna Moon
2026-06-29 17:28:28 -05:00
parent f483630419
commit 0d52ea5ad1
12 changed files with 784 additions and 8 deletions

View File

@@ -0,0 +1,15 @@
-- v0.19 Pantry: add storedAt, source enum, and plantId to Item
CREATE TYPE "ItemSource" AS ENUM ('GARDEN', 'HOMEMADE', 'STORE', 'FARMERS_MARKET', 'GIFTED', 'OTHER');
ALTER TABLE "Item"
ADD COLUMN "storedAt" TIMESTAMP(3),
ADD COLUMN "source" "ItemSource",
ADD COLUMN "plantId" TEXT;
ALTER TABLE "Item"
ADD CONSTRAINT "Item_plantId_fkey"
FOREIGN KEY ("plantId") REFERENCES "Plant"("id")
ON DELETE SET NULL ON UPDATE CASCADE;
CREATE INDEX "Item_plantId_idx" ON "Item"("plantId");