"""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 ###

[((1124, 1155), 'alembic.op.drop_table', 'op.drop_table', (['"""CommentsPhotos"""'], {}), "('CommentsPhotos')\n", (1137, 1155), False, 'from alembic import op\n'), ((792, 868), 'sqlalchemy.ForeignKeyConstraint', 'sa.ForeignKeyConstraint', (["['PhotoID']", "['Photos.PhotoID']"], {'ondelete': '"""CASCADE"""'}), "(['PhotoID'], ['Photos.PhotoID'], ondelete='CASCADE')\n", (815, 868), True, 'import sqlalchemy as sa\n'), ((874, 947), 'sqlalchemy.ForeignKeyConstraint', 'sa.ForeignKeyConstraint', (["['UserID']", "['Users.UserID']"], {'ondelete': '"""CASCADE"""'}), "(['UserID'], ['Users.UserID'], ondelete='CASCADE')\n", (897, 947), True, 'import sqlalchemy as sa\n'), ((953, 989), 'sqlalchemy.PrimaryKeyConstraint', 'sa.PrimaryKeyConstraint', (['"""CommentID"""'], {}), "('CommentID')\n", (976, 989), True, 'import sqlalchemy as sa\n'), ((481, 493), 'sqlalchemy.Integer', 'sa.Integer', ([], {}), '()\n', (491, 493), True, 'import sqlalchemy as sa\n'), ((537, 549), 'sqlalchemy.Integer', 'sa.Integer', ([], {}), '()\n', (547, 549), True, 'import sqlalchemy as sa\n'), ((593, 602), 'sqlalchemy.Text', 'sa.Text', ([], {}), '()\n', (600, 602), True, 'import sqlalchemy as sa\n'), ((645, 657), 'sqlalchemy.Integer', 'sa.Integer', ([], {}), '()\n', (655, 657), True, 'import sqlalchemy as sa\n'), ((701, 714), 'sqlalchemy.DateTime', 'sa.DateTime', ([], {}), '()\n', (712, 714), True, 'import sqlalchemy as sa\n'), ((757, 770), 'sqlalchemy.DateTime', 'sa.DateTime', ([], {}), '()\n', (768, 770), True, 'import sqlalchemy as sa\n')]