"""Initial Migration

Revision ID: b4061aedf0d5
Revises: 60e2ad55f861
Create Date: 2019-07-07 21:46:07.221414

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'b4061aedf0d5'
down_revision = '60e2ad55f861'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('posts',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('title', sa.String(), nullable=True),
    sa.Column('description', sa.String(), nullable=True),
    sa.Column('posted_p', sa.DateTime(), nullable=True),
    sa.Column('user_p', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['user_p'], ['users.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.add_column('users', sa.Column('bio', sa.String(length=255), nullable=True))
    op.add_column('users', sa.Column('profile_pic_path', sa.String(), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('users', 'profile_pic_path')
    op.drop_column('users', 'bio')
    op.drop_table('posts')
    # ### end Alembic commands ###
