"""add user notification prefs

Revision ID: 3a3d048e0784
Revises: e56e408b2208
Create Date: 2026-07-07 15:29:55.307890
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa


revision: str = '3a3d048e0784'
down_revision: Union[str, None] = 'e56e408b2208'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('users', sa.Column('notify_email', sa.Boolean(), nullable=False, server_default=sa.text('true')))
    op.add_column('users', sa.Column('digest_frequency', sa.String(length=10), nullable=False, server_default=sa.text("'daily'")))
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('users', 'digest_frequency')
    op.drop_column('users', 'notify_email')
    # ### end Alembic commands ###
