"""Added model for photo comments

Revision ID: 576712576c48
Revises: 75bb906df167
Create Date: 2018-03-30 02:06:22.877079

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '576712576c48'
down_revision = '75bb906df167'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('CommentsPhotos',
    sa.Column('CommentID', sa.Integer(), nullable=False),
    sa.Column('PhotoID', sa.Integer(), nullable=False),
    sa.Column('Comment', sa.Text(), nullable=False),
    sa.Column('UserID', sa.Integer(), nullable=False),
    sa.Column('Created', sa.DateTime(), nullable=True),
    sa.Column('Updated', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['PhotoID'], ['Photos.PhotoID'], ondelete='CASCADE'),
    sa.ForeignKeyConstraint(['UserID'], ['Users.UserID'], ondelete='CASCADE'),
    sa.PrimaryKeyConstraint('CommentID')
    )
    # ### end Alembic commands ###


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

[(37, 'alembic.op.drop_table', 'op.drop_table', (['"""CommentsPhotos"""'], {}), False, 'from alembic import op\n'), (28, 'sqlalchemy.ForeignKeyConstraint', 'sa.ForeignKeyConstraint', (["['PhotoID']", "['Photos.PhotoID']"], {'ondelete': '"""CASCADE"""'}), True, 'import sqlalchemy as sa\n'), (29, 'sqlalchemy.ForeignKeyConstraint', 'sa.ForeignKeyConstraint', (["['UserID']", "['Users.UserID']"], {'ondelete': '"""CASCADE"""'}), True, 'import sqlalchemy as sa\n'), (30, 'sqlalchemy.PrimaryKeyConstraint', 'sa.PrimaryKeyConstraint', (['"""CommentID"""'], {}), True, 'import sqlalchemy as sa\n'), (22, 'sqlalchemy.Integer', 'sa.Integer', ([], {}), True, 'import sqlalchemy as sa\n'), (23, 'sqlalchemy.Integer', 'sa.Integer', ([], {}), True, 'import sqlalchemy as sa\n'), (24, 'sqlalchemy.Text', 'sa.Text', ([], {}), True, 'import sqlalchemy as sa\n'), (25, 'sqlalchemy.Integer', 'sa.Integer', ([], {}), True, 'import sqlalchemy as sa\n'), (26, 'sqlalchemy.DateTime', 'sa.DateTime', ([], {}), True, 'import sqlalchemy as sa\n'), (27, 'sqlalchemy.DateTime', 'sa.DateTime', ([], {}), True, 'import sqlalchemy as sa\n')]