"""added module table

Revision ID: d0e65ee22df0
Revises: 226e9a4fe9a5
Create Date: 2020-10-31 01:32:27.804709

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'd0e65ee22df0'
down_revision = '226e9a4fe9a5'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('module',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=50), nullable=True),
    sa.Column('path', sa.String(length=200), nullable=True),
    sa.Column('project_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['project_id'], ['project.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.add_column('config', sa.Column('ignore_dirs', sa.String(length=200), nullable=True))
    op.add_column('config', sa.Column('ignore_files', sa.String(length=200), nullable=True))
    op.add_column('config', sa.Column('python_home', sa.String(length=200), nullable=True))
    op.add_column('config', sa.Column('version_control', sa.Boolean(), nullable=True))
    op.add_column('project', sa.Column('active', sa.Boolean(), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('project', 'active')
    op.drop_column('config', 'version_control')
    op.drop_column('config', 'python_home')
    op.drop_column('config', 'ignore_files')
    op.drop_column('config', 'ignore_dirs')
    op.drop_table('module')
    # ### end Alembic commands ###
