- Added compaction columns to issues table (compaction_level, compacted_at, original_size) - Created issue_snapshots table for snapshot storage before compaction - Added compaction configuration with opt-in flag (compaction_enabled=false by default) - Implemented GetTier1Candidates and GetTier2Candidates queries - Added CheckEligibility validation function - Comprehensive tests for all compaction queries - Idempotent migrations for existing databases Closes bd-252, bd-253, bd-254 Amp-Thread-ID: https://ampcode.com/threads/T-c4d7acd1-c161-4b80-9d80-a0691e8fa87b Co-authored-by: Amp <amp@ampcode.com>