-- 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));
