"""add is_trashed and trashed_at to messages

Revision ID: 0007
Revises: 0006
Create Date: 2026-03-25

"""
from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision = '0007'
down_revision = '0006'
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.add_column(
        'messages',
        sa.Column('is_trashed', sa.Boolean(), nullable=False, server_default=sa.text('false')),
    )
    op.add_column(
        'messages',
        sa.Column('trashed_at', sa.DateTime(timezone=True), nullable=True),
    )


def downgrade() -> None:
    op.drop_column('messages', 'trashed_at')
    op.drop_column('messages', 'is_trashed')
