-- 뉴스 소스 관리 테이블
CREATE TABLE IF NOT EXISTS news_sources (
    id SERIAL PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    country VARCHAR(10),
    feed_url TEXT NOT NULL,
    feed_type VARCHAR(20) DEFAULT 'rss',
    category VARCHAR(50),
    language VARCHAR(10),
    enabled BOOLEAN DEFAULT true,
    last_fetched_at TIMESTAMPTZ,
    created_at TIMESTAMPTZ DEFAULT NOW()
);

-- source_channel enum에 'news' 추가
ALTER TYPE source_channel ADD VALUE IF NOT EXISTS 'news';
