"""Add avatar columns to creators table.

Revision ID: 014_add_creator_avatar
Revises: 013_add_search_log
"""
from alembic import op
import sqlalchemy as sa

revision = "014_add_creator_avatar"
down_revision = "013_add_search_log"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.add_column("creators", sa.Column("avatar_url", sa.String(1000), nullable=True))
    op.add_column("creators", sa.Column("avatar_source", sa.String(50), nullable=True))
    op.add_column("creators", sa.Column("avatar_fetched_at", sa.TIMESTAMP(), nullable=True))


def downgrade() -> None:
    op.drop_column("creators", "avatar_fetched_at")
    op.drop_column("creators", "avatar_source")
    op.drop_column("creators", "avatar_url")
