-- 2026-05-13 — 기술/AI 뉴스 source seed (14건, 8개국)
-- WHERE NOT EXISTS 로 idempotent. 기존 row 보존, 신규만 insert.
-- briefing/digest 의 cross-country tech 토픽 cluster 다양성 확보.
-- 8 country: CN, DE, FR, GB, IN, JP, KR, US. category = Tech / AI.

INSERT INTO news_sources (name, country, language, feed_type, feed_url, category, enabled)
SELECT v.name, v.country, v.language, v.feed_type, v.feed_url, v.category, v.enabled
FROM (VALUES
    ('GeekNews (Hada)',          'KR', 'ko', 'rss', 'https://feeds.feedburner.com/geeknews-feed',                'Tech', true),
    ('AI Times',                 'KR', 'ko', 'rss', 'https://www.aitimes.com/rss/S1N1.xml',                      'AI',   true),
    ('Hacker News',              'US', 'en', 'rss', 'https://hnrss.org/frontpage?count=30',                      'Tech', true),
    ('ArsTechnica AI',           'US', 'en', 'rss', 'https://arstechnica.com/ai/feed/',                          'AI',   true),
    ('The Verge Tech',           'US', 'en', 'rss', 'https://www.theverge.com/rss/index.xml',                    'Tech', true),
    ('TechCrunch',               'US', 'en', 'rss', 'https://techcrunch.com/feed/',                              'Tech', true),
    ('The Register',             'GB', 'en', 'rss', 'https://www.theregister.com/headlines.atom',                'Tech', true),
    ('Heise Online',             'DE', 'de', 'rss', 'https://www.heise.de/rss/heise-atom.xml',                   'Tech', true),
    ('ITmedia News',             'JP', 'ja', 'rss', 'https://rss.itmedia.co.jp/rss/2.0/aiplus.xml',              'AI',   true),
    ('Gigazine',                 'JP', 'ja', 'rss', 'https://gigazine.net/news/rss_2.0/',                        'Tech', true),
    ('36Kr',                     'CN', 'zh', 'rss', 'https://36kr.com/feed',                                     'Tech', true),
    ('Numerama',                 'FR', 'fr', 'rss', 'https://www.numerama.com/feed',                             'Tech', true),
    ('YourStory',                'IN', 'en', 'rss', 'https://yourstory.com/feed',                                   'Tech', true),
    ('BBC Technology',           'GB', 'en', 'rss', 'https://feeds.bbci.co.uk/news/technology/rss.xml',          'Tech', true)
) AS v(name, country, language, feed_type, feed_url, category, enabled)
WHERE NOT EXISTS (
    SELECT 1 FROM news_sources ns WHERE ns.name = v.name
);
