"""Add ProjectView model.

Revision ID: d9f75931a18
Revises: 2aa8c8ea9d62
Create Date: 2013-02-15 02:47:57.931719

"""

# revision identifiers, used by Alembic.
revision = 'd9f75931a18'
down_revision = '2aa8c8ea9d62'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table(u'projectview',
    sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('project_id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['project_id'], [u'project.id'], ),
    sa.ForeignKeyConstraint(['user_id'], [u'user.id'], ),
    sa.PrimaryKeyConstraint('project_id', 'user_id')
    )
    ### end Alembic commands ###


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