"""Update inputs

Revision ID: 2e32568b569b
Revises: 4df830a960b2
Create Date: 2015-01-08 18:46:54.604855

"""

# revision identifiers, used by Alembic.
revision = '2e32568b569b'
down_revision = '4df830a960b2'

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

def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('inputs')
    op.create_table('inputs',
    sa.Column('id', mysql.BIGINT, nullable=False),
    sa.Column('output_id', mysql.BIGINT, nullable=True),
    sa.Column('script_type', mysql.TINYINT(unsigned=True), nullable=True),
    sa.Column('address_id', mysql.BIGINT, nullable=True),
    sa.Column('value', mysql.BIGINT, nullable=True),
    sa.Column('tx_id', mysql.BIGINT, nullable=True),
    sa.Column('offset', mysql.INTEGER, nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('inputs')
    op.create_table('inputs',
    sa.Column('id', sa.BigInteger(), nullable=False),
    sa.Column('txHash', sa.String(length=64), nullable=True),
    sa.Column('outputHash', sa.String(length=64), nullable=True),
    sa.Column('outputN', sa.Integer(), nullable=True),
    sa.Column('script_sig', sa.String(length=500), nullable=True),
    sa.Column('offset', sa.Integer(), nullable=True),
    sa.Column('pushed_from', sa.String(length=25), nullable=True, index=True),
    sa.PrimaryKeyConstraint('id')
    )
    ### end Alembic commands ###
