"""LicenseUsage: correct mb fields to be floats iso integers

Revision ID: a678c84d5633
Revises: 02debd224316
Create Date: 2024-10-11 08:03:22.823327

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'a678c84d5633'
down_revision = '02debd224316'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('license_usage', schema=None) as batch_op:
        batch_op.alter_column('storage_mb_used',
               existing_type=sa.INTEGER(),
               type_=sa.Float(),
               existing_nullable=True)
        batch_op.alter_column('embedding_mb_used',
               existing_type=sa.INTEGER(),
               type_=sa.Float(),
               existing_nullable=True)

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('license_usage', schema=None) as batch_op:
        batch_op.alter_column('embedding_mb_used',
               existing_type=sa.Float(),
               type_=sa.INTEGER(),
               existing_nullable=True)
        batch_op.alter_column('storage_mb_used',
               existing_type=sa.Float(),
               type_=sa.INTEGER(),
               existing_nullable=True)

    # ### end Alembic commands ###
