"""add_pipeline_info_5

Revision ID: d466c551816f
Revises: e4fb49a4fe86
Create Date: 2025-06-05 13:56:05.962215

"""
from alembic import op
import models as models
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'd466c551816f'
down_revision = 'e4fb49a4fe86'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('datasource_providers', schema=None) as batch_op:
        batch_op.drop_constraint(batch_op.f('datasource_provider_plugin_id_provider_idx'), type_='unique')
        batch_op.create_index('datasource_provider_auth_type_provider_idx', ['tenant_id', 'plugin_id', 'provider'], unique=False)

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('datasource_providers', schema=None) as batch_op:
        batch_op.drop_index('datasource_provider_auth_type_provider_idx')
        batch_op.create_unique_constraint(batch_op.f('datasource_provider_plugin_id_provider_idx'), ['plugin_id', 'provider'])

    # ### end Alembic commands ###
