-- Migration: Add project_id field to wishlist_items table
-- Date: 2026-02-02
--
-- This migration adds project_id field to wishlist_items table to allow
-- grouping wishlist items by project. The field is nullable, so existing
-- items without a project will remain valid.

ALTER TABLE wishlist_items 
ADD COLUMN project_id INTEGER REFERENCES projects(id) ON DELETE SET NULL;

CREATE INDEX idx_wishlist_items_project_id ON wishlist_items(project_id);

COMMENT ON COLUMN wishlist_items.project_id IS 'Project this wishlist item belongs to (optional)';
