-- Add selection_id column to asset_selections for easier reference
-- Migration 034

-- Add selection_id as TEXT (will reference it as string in code)
ALTER TABLE asset_selections ADD COLUMN IF NOT EXISTS selection_id TEXT UNIQUE DEFAULT gen_random_uuid()::TEXT;

-- Create index for fast lookups
CREATE INDEX IF NOT EXISTS idx_asset_selections_selection_id ON asset_selections(selection_id);

-- Comments
COMMENT ON COLUMN asset_selections.selection_id IS 'Unique selection identifier for external references';
