"""Add is_read and archived_at to survey_responses.

Revision ID: 049
Revises: 048
Create Date: 2026-03-05
"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa

revision: str = "049"
down_revision: str = "048"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    op.add_column(
        "survey_responses",
        sa.Column("is_read", sa.Boolean(), nullable=False, server_default="false"),
    )
    op.add_column(
        "survey_responses",
        sa.Column("archived_at", sa.DateTime(timezone=True), nullable=True),
    )


def downgrade() -> None:
    op.drop_column("survey_responses", "archived_at")
    op.drop_column("survey_responses", "is_read")
