"""empty message

Revision ID: a75a6d1259c8
Revises: 
Create Date: 2017-09-07 12:08:22.503621

"""
from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision = 'a75a6d1259c8'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('blacklist_token',
                    sa.Column('id', sa.Integer(), nullable=False),
                    sa.Column('token', sa.String(length=255), nullable=False),
                    sa.Column('blacklisted_on', sa.DateTime(), nullable=False),
                    sa.PrimaryKeyConstraint('id'),
                    sa.UniqueConstraint('token')
                    )
    op.create_table('users',
                    sa.Column('id', sa.Integer(), nullable=False),
                    sa.Column('email', sa.String(length=250), nullable=False),
                    sa.Column('password', sa.String(length=250), nullable=False),
                    sa.Column('registered_on', sa.DateTime(), nullable=False),
                    sa.PrimaryKeyConstraint('id'),
                    sa.UniqueConstraint('email')
                    )
    op.create_table('shoppinglists',
                    sa.Column('id', sa.Integer(), nullable=False),
                    sa.Column('name', sa.String(length=250), nullable=True),
                    sa.Column('description', sa.String(length=250), nullable=True),
                    sa.Column('user_id', sa.Integer(), nullable=True),
                    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
                    sa.PrimaryKeyConstraint('id')
                    )
    op.create_table('items',
                    sa.Column('item_id', sa.Integer(), nullable=False),
                    sa.Column('name', sa.String(length=250), nullable=True),
                    sa.Column('price', sa.String(length=250), nullable=True),
                    sa.Column('list_id', sa.Integer(), nullable=True),
                    sa.ForeignKeyConstraint(['list_id'], ['shoppinglists.id'], ),
                    sa.PrimaryKeyConstraint('item_id')
                    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('items')
    op.drop_table('shoppinglists')
    op.drop_table('users')
    op.drop_table('blacklist_token')
    # ### end Alembic commands ###
