"""Add module_details columns for terraform_version and terraform_modules

Revision ID: 81609b772646
Revises: 2e9fe1292b2b
Create Date: 2023-08-10 07:04:38.026903

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision = '81609b772646'
down_revision = '2e9fe1292b2b'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('module_details', sa.Column('terraform_modules', sa.LargeBinary(length=16777215).with_variant(mysql.MEDIUMBLOB(), 'mysql'), nullable=True))
    op.add_column('module_details', sa.Column('terraform_version', sa.LargeBinary(length=16777215).with_variant(mysql.MEDIUMBLOB(), 'mysql'), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('module_details') as module_details_op:
        module_details_op.drop_column('terraform_version')
        module_details_op.drop_column('terraform_modules')
    # ### end Alembic commands ###
