"""added Post class

Revision ID: b2be0a42e020
Revises: 43dbc7ea3996
Create Date: 2019-03-13 13:46:58.938232

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'b2be0a42e020'
down_revision = '43dbc7ea3996'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('membernewspost',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('news_title', sa.String(), nullable=False),
    sa.Column('news_post', sa.String(), nullable=False),
    sa.Column('publish_date', sa.DateTime(), nullable=False),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # op.create_index(op.f('ix_user_userAccess'), 'user', ['userAccess'], unique=False)
    # op.drop_index('ix_user_userAccess', table_name='user')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    # op.create_index('ix_user_userAccess', 'user', ['userAccess'], unique=False)
    # op.drop_index(op.f('ix_user_userAccess'), table_name='user')
    op.drop_table('membernewspost')
    # ### end Alembic commands ###
