"""add save_models_to_registry [5cc3f41cf048].

Revision ID: 5cc3f41cf048
Revises: 0.53.1
Create Date: 2023-12-12 15:29:58.694643

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "5cc3f41cf048"
down_revision = "0.53.1"
branch_labels = None
depends_on = None


def upgrade() -> None:
    """Upgrade database schema and/or data, creating a new revision."""
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("model", schema=None) as batch_op:
        batch_op.add_column(
            sa.Column(
                "save_models_to_registry",
                sa.BOOLEAN(),
                nullable=False,
                server_default="0",
            )
        )

    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade database schema and/or data back to the previous revision."""
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("model", schema=None) as batch_op:
        batch_op.drop_column("save_models_to_registry")

    # ### end Alembic commands ###
