<reponame>alphagov/notify-api
"""empty message

Revision ID: 120_usage_table
Revises: 110_add_restricted_to_service
Create Date: 2015-10-26 14:03:04.008629

"""

# revision identifiers, used by Alembic.
revision = '120_usage_table'
down_revision = '110_add_restricted_to_service'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('usage',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('day', sa.Date(), nullable=False),
    sa.Column('count', sa.BigInteger(), nullable=False),
    sa.Column('service_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['service_id'], ['services.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    ### end Alembic commands ###


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