"""Add bio, social_links, and featured columns to creators table.

Revision ID: 015_add_creator_profile
Revises: 014_add_creator_avatar
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects.postgresql import JSONB

revision = "015_add_creator_profile"
down_revision = "014_add_creator_avatar"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.add_column("creators", sa.Column("bio", sa.Text(), nullable=True))
    op.add_column("creators", sa.Column("social_links", JSONB(), nullable=True))
    op.add_column("creators", sa.Column("featured", sa.Boolean(), server_default="false", nullable=False))


def downgrade() -> None:
    op.drop_column("creators", "featured")
    op.drop_column("creators", "social_links")
    op.drop_column("creators", "bio")
