"""project_image_cover

Revision: 0096
Revision ID: 5397fd6fbb4d
Revises: 19a97b706e5a
Create Date: 2017-06-20 14:58:54.184206

"""

# revision identifiers, used by Alembic.
revision = '5397fd6fbb4d'
down_revision = '19a97b706e5a'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.add_column('projects', sa.Column('image_cover_id', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'projects', 'files', ['image_cover_id'], ['id'], ondelete='SET NULL')


def downgrade():
    op.drop_column('projects', 'image_cover_id')
