"""Add start_date to campaigns.

Revision ID: b047
Revises: b046
Create Date: 2026-06-03
"""

from alembic import op
import sqlalchemy as sa

revision = "b047"
down_revision = "b046"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.add_column(
        "campaigns",
        sa.Column("start_date", sa.DateTime(), nullable=True),
    )
    op.create_index("ix_campaigns_start_date", "campaigns", ["start_date"])


def downgrade() -> None:
    op.drop_index("ix_campaigns_start_date", table_name="campaigns")
    op.drop_column("campaigns", "start_date")
