"""Added common network column

Revision ID: 65a966e7671a
Revises: 75bd00cd3edc
Create Date: 2018-12-15 22:18:52.038771

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '65a966e7671a'
down_revision = '75bd00cd3edc'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('block_task_meta', sa.Column('network', sa.String(length=32), nullable=False))
    op.add_column('blocks', sa.Column('network', sa.String(length=32), nullable=False))
    op.add_column('logs', sa.Column('network', sa.String(length=32), nullable=False))
    op.add_column('meta_info', sa.Column('network', sa.String(length=32), nullable=False))
    op.add_column('receipts', sa.Column('network', sa.String(length=32), nullable=False))
    op.add_column('state', sa.Column('network', sa.String(length=32), nullable=False))
    op.add_column('state_diff', sa.Column('network', sa.String(length=32), nullable=False))
    op.add_column('storage', sa.Column('network', sa.String(length=32), nullable=False))
    op.add_column('storage_diff', sa.Column('network', sa.String(length=32), nullable=False))
    op.add_column('traces', sa.Column('network', sa.String(length=32), nullable=False))
    op.add_column('transactions', sa.Column('network', sa.String(length=32), nullable=False))
    op.add_column('uncles', sa.Column('network', sa.String(length=32), nullable=False))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('uncles', 'network')
    op.drop_column('transactions', 'network')
    op.drop_column('traces', 'network')
    op.drop_column('storage_diff', 'network')
    op.drop_column('storage', 'network')
    op.drop_column('state_diff', 'network')
    op.drop_column('state', 'network')
    op.drop_column('receipts', 'network')
    op.drop_column('meta_info', 'network')
    op.drop_column('logs', 'network')
    op.drop_column('blocks', 'network')
    op.drop_column('block_task_meta', 'network')
    # ### end Alembic commands ###
