-- Incremental Migration for Tag Popularity Scores
ALTER TABLE tags ADD COLUMN IF NOT EXISTS popularity_score INTEGER DEFAULT 3;

-- Update scores for common aromas (5)
UPDATE tags SET popularity_score = 5 WHERE name IN ('Vanille', 'Eiche', 'Karamell', 'Zitrone', 'Zitrus', 'Wärmend');

-- Update scores for frequent aromas (4)
UPDATE tags SET popularity_score = 4 WHERE name IN ('Honig', 'Malz', 'Apfel', 'Grüner Apfel', 'Bratapfel', 'Birne', 'Trockenfrüchte', 'Pfeffer', 'Zimt', 'Torfrauch', 'Lagerfeuer', 'Trocken', 'Lang anhaltend');

-- Update scores for regular aromas (3)
UPDATE tags SET popularity_score = 3 WHERE name IN ('Schokolade', 'Zartbitterschokolade', 'Milchschokolade', 'Nüsse', 'Orange', 'Orangenschale', 'Beeren', 'Brombeere', 'Himbeere', 'Ingwer', 'Gras', 'Heu', 'Meersalz', 'Salzlake', 'Asche', 'Speck', 'Geräucherter Schinken', 'Grillfleisch', 'Ölig', 'Viskos', 'Würzig');

-- Update scores for specific aromas (2)
UPDATE tags SET popularity_score = 2 WHERE name IN ('Marzipan', 'Butterkeks', 'Pfirsich', 'Aprikose', 'Banane', 'Pflaume', 'Muskatnuss', 'Minze', 'Menthol', 'Nelke', 'Medizinisch', 'Jod', 'Teer', 'Asphalt', 'Leder', 'Tabak', 'Schwefel', 'Kurz');

-- Update scores for rare/exotic aromas (1)
UPDATE tags SET popularity_score = 1 WHERE name IN ('Kokosnuss', 'Ananas', 'Tropische Früchte', 'Melone', 'Eukalyptus', 'Seetang', 'Algen', 'Austern', 'Wässrig', 'Pilze', 'Seife', 'Metallisch');
