"""Add table usercache

Revision ID: d6b40a745e5
Revises: 1edda52b619f
Create Date: 2017-04-13 15:25:44.050719

"""

# revision identifiers, used by Alembic.
revision = 'd6b40a745e5'
down_revision = '1edda52b619f'

from alembic import op
import sqlalchemy as sa


def upgrade():
    try:
        op.create_table('usercache',
        sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('username', sa.Unicode(length=64), nullable=True, index=True),
        sa.Column('resolver', sa.Unicode(length=120), nullable=True),
        sa.Column('user_id', sa.Unicode(length=320), nullable=True, index=True),
        sa.Column('timestamp', sa.DateTime(), nullable=True),
        sa.PrimaryKeyConstraint('id')
        )
    except Exception as exx:
        print ("Could not create table 'usercache'.")
        print (exx)


def downgrade():
    op.drop_table('usercache')

@@ -51,28 +51,28 @@
 evises: 
-1edda52b619f
+307a4fbe8a05
 %0ACreate 
@@ -197,20 +197,20 @@
  = '
-1edda52b619f
+307a4fbe8a05
 '%0A%0Af

move the DB migration for usercache