"""Add step_file_hash to cad_files.

Revision ID: 041
Revises: 040
"""
import sqlalchemy as sa
from alembic import op

revision = '041'
down_revision = '040'
branch_labels = None
depends_on = None


def upgrade():
    op.add_column('cad_files', sa.Column('step_file_hash', sa.String(64), nullable=True))
    op.create_index('ix_cad_files_step_file_hash', 'cad_files', ['step_file_hash'])


def downgrade():
    op.drop_index('ix_cad_files_step_file_hash', table_name='cad_files')
    op.drop_column('cad_files', 'step_file_hash')
