"""add revops feature flag

Revision ID: 3b951bebf866
Revises: fba2f31e6d5a
Create Date: 2025-10-22 15:20:03.067699

"""

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

# Polar Custom Imports

# revision identifiers, used by Alembic.
revision = "3b951bebf866"
down_revision = "fba2f31e6d5a"
branch_labels: tuple[str] | None = None
depends_on: tuple[str] | None = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.execute(
        """
        UPDATE organizations
        SET feature_settings = jsonb_set(feature_settings, '{revops_enabled}', 'false'::jsonb)
        """
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###
