"""Drop stats table

Revision ID: 115fd26ea9a2
Revises: ebb488aa9a5e
Create Date: 2017-05-04 08:10:54.825966

"""

# revision identifiers, used by Alembic.
revision = '115fd26ea9a2'
down_revision = 'ebb488aa9a5e'

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

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


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('stat',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('timestamp', postgresql.DOUBLE_PRECISION(precision=53), autoincrement=False, nullable=True),
    sa.Column('stat_db_size', sa.BIGINT(), server_default=sa.text("'0'::bigint"), autoincrement=False, nullable=True),
    sa.Column('stat_num_new_sessions', sa.INTEGER(), server_default=sa.text('0'), autoincrement=False, nullable=True),
    sa.Column('stat_system_load_avg', postgresql.DOUBLE_PRECISION(precision=53), server_default=sa.text("'0'::double precision"), autoincrement=False, nullable=True),
    sa.Column('stat_num_redis_keys', sa.INTEGER(), server_default=sa.text('0'), autoincrement=False, nullable=True),
    sa.Column('stat_redis_memory_usage', sa.INTEGER(), server_default=sa.text('0'), autoincrement=False, nullable=True),
    sa.PrimaryKeyConstraint('id', name='stat_pkey')
    )
    # ### end Alembic commands ###
