"""tx archive

Revision ID: 8690e2cc49ec
Revises: 7524f15a3a65
Create Date: 2018-02-20 11:49:38.069860

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '8690e2cc49ec'
down_revision = '7524f15a3a65'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('eth_tx',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('address', sa.String(length=128), nullable=True),
    sa.Column('txid', sa.String(length=128), nullable=True),
    sa.Column('mchash', sa.String(length=128), nullable=True),
    sa.Column('sent', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_eth_tx_address'), 'eth_tx', ['address'], unique=True)
    op.create_index(op.f('ix_eth_tx_mchash'), 'eth_tx', ['mchash'], unique=False)
    op.create_index(op.f('ix_eth_tx_txid'), 'eth_tx', ['txid'], unique=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_eth_tx_txid'), table_name='eth_tx')
    op.drop_index(op.f('ix_eth_tx_mchash'), table_name='eth_tx')
    op.drop_index(op.f('ix_eth_tx_address'), table_name='eth_tx')
    op.drop_table('eth_tx')
    # ### end Alembic commands ###
