"""leaderboard table

Revision ID: 9879036ea4bd
Revises: 
Create Date: 2019-08-22 01:45:24.590124

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('leaderboard',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('username', sa.String(length=64), nullable=True),
    sa.Column('score', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_leaderboard_username'), 'leaderboard', ['username'], unique=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_leaderboard_username'), table_name='leaderboard')
    op.drop_table('leaderboard')
    # ### end Alembic commands ###
