"""add data source params to monitor config

Revision ID: 52a5f1a957bc
Revises: efddde14da21
Create Date: 2024-06-03 20:19:12.481577

"""

import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = "52a5f1a957bc"
down_revision = "efddde14da21"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "monitorconfig",
        sa.Column(
            "datasource_params", postgresql.JSONB(astext_type=sa.Text()), nullable=True
        ),
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("monitorconfig", "datasource_params")
    # ### end Alembic commands ###
