grocery-app/backend/migrations/add_image_columns.sql
Nico a2c08aff45
All checks were successful
Build & Deploy Costco Grocery List / build (push) Successful in 1m36s
Build & Deploy Costco Grocery List / verify-images (push) Successful in 2s
Build & Deploy Costco Grocery List / deploy (push) Successful in 8s
Build & Deploy Costco Grocery List / notify (push) Successful in 0s
chore: harden reliability checks
2026-05-25 16:20:35 -07:00

9 lines
326 B
SQL

-- Add image columns to grocery_list table
ALTER TABLE grocery_list
ADD COLUMN IF NOT EXISTS item_image BYTEA,
ADD COLUMN IF NOT EXISTS image_mime_type VARCHAR(50);
-- Index to speed up queries that filter by rows with images.
CREATE INDEX IF NOT EXISTS idx_grocery_list_has_image
ON grocery_list ((item_image IS NOT NULL));