-- Migration: Add thumbnail_path column to photos table
-- Run: psql -h $PGHOST -d $PGDATABASE -U $PGUSER -f migrations/001_add_thumbnail_path.sql

ALTER TABLE photos ADD COLUMN IF NOT EXISTS thumbnail_path VARCHAR(2000);

CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_photos_thumbnail_path_null
    ON photos (id) WHERE thumbnail_path IS NULL;
