021-rename-keyword-counters.sql
1 -- Rename keyword counter fields for clarity 2 -- processed_count -> assets_scraped_count (counts sites where assets were captured) 3 -- rework_low_scoring_count -> rescored_count (counts sites that were rescored) 4 5 -- This migration has already been applied (columns already renamed) 6 -- Just ensure indexes exist 7 CREATE INDEX IF NOT EXISTS idx_keywords_priority ON keywords(priority DESC); 8 CREATE INDEX IF NOT EXISTS idx_keywords_status ON keywords(status); 9 CREATE INDEX IF NOT EXISTS idx_keywords_country ON keywords(country_code); 10 CREATE INDEX IF NOT EXISTS idx_keywords_search_volume ON keywords(search_volume DESC); 11 CREATE INDEX IF NOT EXISTS idx_keywords_priority_search_volume ON keywords(priority DESC, search_volume DESC);