"""Add counts Table

Revision ID: 733f7547efc8
Revises: 03c60f6ff751
Create Date: 2018-11-03 11:08:18.388616

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '733f7547efc8'
down_revision = '03c60f6ff751'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('counts',
    sa.Column('bedcount', sa.Integer(), nullable=False),
    sa.Column('day', sa.Date(), nullable=False),
    sa.Column('shelter_id', sa.Integer(), nullable=False),
    sa.Column('call_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['call_id'], ['calls.id'], ),
    sa.ForeignKeyConstraint(['shelter_id'], ['shelters.id'], ),
    sa.PrimaryKeyConstraint('day', 'shelter_id')
    )
    # ### end Alembic commands ###


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