-- V18: File Management (Rename, Move, Trash)
-- Adds soft delete support for trash/recycle bin functionality

-- Add deleted_at column for soft delete (trash)
ALTER TABLE media_items ADD COLUMN deleted_at TEXT;

-- Index for efficient trash queries
CREATE INDEX idx_media_deleted_at ON media_items(deleted_at);

-- Index for listing non-deleted items (most common query pattern)
CREATE INDEX idx_media_not_deleted ON media_items(id) WHERE deleted_at IS NULL;
