"""Add content_full and context_prepared caches to rss_items.

Revision ID: 0038
Revises: 0037
Create Date: 2026-04-13
"""

from __future__ import annotations

import sqlalchemy as sa
from alembic import op

revision = "0038"
down_revision = "0037"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.add_column("rss_items", sa.Column("content_full", sa.Text(), nullable=True))
    op.add_column(
        "rss_items",
        sa.Column("context_prepared", sa.Text(), nullable=True),
    )
    op.add_column(
        "rss_items",
        sa.Column("content_fetched_at", sa.DateTime(timezone=True), nullable=True),
    )


def downgrade() -> None:
    op.drop_column("rss_items", "content_fetched_at")
    op.drop_column("rss_items", "context_prepared")
    op.drop_column("rss_items", "content_full")
