Add UNIQUE(symbol, entry_time, direction) constraint to trades table and use INSERT OR IGNORE to skip duplicates. Includes auto-migration to clean up existing duplicate entries on startup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>