"""add tpu slots

Revision ID: 57b523dec0e8
Revises: 10e39a34eed5
Create Date: 2018-11-12 10:54:45.271417

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "57b523dec0e8"
down_revision = "10e39a34eed5"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("agents", sa.Column("tpu_slots", sa.Float(), nullable=False, server_default="0"))
    op.add_column(
        "agents", sa.Column("used_tpu_slots", sa.Float(), nullable=False, server_default="0")
    )
    op.alter_column("agents", "tpu_slots", server_default=None)
    op.alter_column("agents", "used_tpu_slots", server_default=None)
    # ### end Alembic commands ###


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