"""add_is_public_flag_to_scaling_group

Revision ID: fe59ec332c07
Revises: bedd92de93af
Create Date: 2023-04-24 22:35:05.793777

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "fe59ec332c07"
down_revision = "bedd92de93af"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "scaling_groups",
        sa.Column("is_public", sa.Boolean(), server_default=sa.text("true"), nullable=False),
    )
    op.create_index(
        op.f("ix_scaling_groups_is_public"), "scaling_groups", ["is_public"], unique=False
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f("ix_scaling_groups_is_public"), table_name="scaling_groups")
    op.drop_column("scaling_groups", "is_public")
    # ### end Alembic commands ###
