"""empty message

Revision ID: 046ac512a351
Revises: 1590fde0b71f
Create Date: 2021-04-13 18:42:18.656006

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = '046ac512a351'
down_revision = '1590fde0b71f'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('tbl_comment',
    sa.Column('comment_id', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('user_id', postgresql.UUID(as_uuid=True), nullable=True),
    sa.Column('task_id', postgresql.UUID(as_uuid=True), nullable=True),
    sa.Column('comment', sa.String(length=255), nullable=False),
    sa.ForeignKeyConstraint(['task_id'], ['tbl_tasks.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['tbl_auth_service_users.id'], ),
    sa.PrimaryKeyConstraint('comment_id'),
    sa.UniqueConstraint('comment_id')
    )
    op.drop_column('tbl_tasks', 'comment')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('tbl_tasks', sa.Column('comment', sa.TEXT(), autoincrement=False, nullable=True))
    op.drop_table('tbl_comment')
    # ### end Alembic commands ###
