"""update base table

Revision ID: d3621caca0d6
Revises: 1f169698c3e2
Create Date: 2021-03-14 14:46:10.350927

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'd3621caca0d6'
down_revision = '1f169698c3e2'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('BaseTable', sa.Column('distance_1', sa.Integer(), nullable=False))
    op.add_column('BaseTable', sa.Column('distance_2', sa.Integer(), nullable=True))
    op.add_column('BaseTable', sa.Column('gun_short', sa.String(), nullable=False))
    op.add_column('BaseTable', sa.Column('series', sa.Integer(), nullable=False))
    op.add_column('BaseTable', sa.Column('short_caption', sa.String(), nullable=False))
    op.add_column('BaseTable', sa.Column('static_id', sa.Integer(), nullable=False))
    op.add_column('BaseTable', sa.Column('total_shoot', sa.Integer(), nullable=False))
    op.drop_column('BaseTable', 'name')
    op.drop_column('BaseTable', 'number_shoot')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('BaseTable', sa.Column('number_shoot', sa.INTEGER(), autoincrement=False, nullable=False))
    op.add_column('BaseTable', sa.Column('name', sa.VARCHAR(), autoincrement=False, nullable=False))
    op.drop_column('BaseTable', 'total_shoot')
    op.drop_column('BaseTable', 'static_id')
    op.drop_column('BaseTable', 'short_caption')
    op.drop_column('BaseTable', 'series')
    op.drop_column('BaseTable', 'gun_short')
    op.drop_column('BaseTable', 'distance_2')
    op.drop_column('BaseTable', 'distance_1')
    # ### end Alembic commands ###
