"""add_session_table

Revision ID: 8ce3d6d070da
Revises: 885280875a1c
Create Date: 2016-10-27 20:04:26.845536

"""

# revision identifiers, used by Alembic.
revision = '8ce3d6d070da'
down_revision = '885280875a1c'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade(engine_name):
    globals()["upgrade_%s" % engine_name]()


def downgrade(engine_name):
    globals()["downgrade_%s" % engine_name]()





def upgrade_data_broker():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('session_map',
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('updated_at', sa.DateTime(), nullable=True),
    sa.Column('session_id', sa.Integer(), nullable=False),
    sa.Column('uid', sa.Text(), nullable=True),
    sa.Column('data', sa.Text(), nullable=True),
    sa.Column('expiration', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('session_id')
    )
    ### end Alembic commands ###


def downgrade_data_broker():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('session_map')
    ### end Alembic commands ###

