-- Add columns for multiple image sizes
ALTER TABLE products
ADD COLUMN IF NOT EXISTS thumbnail_path TEXT,
ADD COLUMN IF NOT EXISTS medium_path TEXT;

-- Rename local_image_path to full_path for clarity
ALTER TABLE products
RENAME COLUMN local_image_path TO full_path;

-- Add index for image queries
CREATE INDEX IF NOT EXISTS idx_products_images ON products(full_path, thumbnail_path, medium_path);
