"""Add 'paid_till' to 'campaigns'

Revision ID: d2f3d086e363
Revises: 08b89b2f1e5d
Create Date: 2022-04-25 15:51:34.186958

"""
import sqlalchemy as sa
from alembic import op
import maps_adv.adv_store.v2.lib.db.columns


# revision identifiers, used by Alembic.
revision = "d2f3d086e363"
down_revision = "08b89b2f1e5d"
branch_labels = None
depends_on = None


def upgrade():
    op.add_column(
        "campaign",
        sa.Column(
            "paid_till",
            maps_adv.adv_store.v2.lib.db.columns.DateTimeTZ(),
            nullable=True,
        ),
    )


def downgrade():
    op.drop_column("campaign", "paid_till")
