"""Add Review Table

Revision ID: <PASSWORD>
Revises: 
Create Date: 2019-08-07 13:09:49.691184

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<PASSWORD>'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('review',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('date_created', sa.DateTime(), nullable=True),
    sa.Column('date_modified', sa.DateTime(), nullable=True),
    sa.Column('comment', sa.Text(), nullable=True),
    sa.Column('tag_id', sa.Integer(), nullable=True),
    sa.Column('score', sa.Integer(), nullable=True),
    sa.Column('submission_id', sa.Integer(), nullable=True),
    sa.Column('author_id', sa.Integer(), nullable=True),
    sa.Column('assignment_version', sa.Integer(), nullable=True),
    sa.Column('submission_version', sa.Integer(), nullable=True),
    sa.Column('version', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(('author_id',), ['user.id'], ),
    sa.ForeignKeyConstraint(('submission_id',), ['submission.id'], ),
    sa.ForeignKeyConstraint(('tag_id',), ['assignment_tag.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_foreign_key(None, 'submission', 'assignment_group', ['assignment_group_id'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'submission', type_='foreignkey')
    op.drop_table('review')
    # ### end Alembic commands ###

"""Add Review Table

Revision ID: <PASSWORD>
Revises: 
Create Date: 2019-08-07 13:09:49.691184

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<PASSWORD>'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('review',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('date_created', sa.DateTime(), nullable=True),
    sa.Column('date_modified', sa.DateTime(), nullable=True),
    sa.Column('comment', sa.Text(), nullable=True),
    sa.Column('tag_id', sa.Integer(), nullable=True),
    sa.Column('score', sa.Integer(), nullable=True),
    sa.Column('submission_id', sa.Integer(), nullable=True),
    sa.Column('author_id', sa.Integer(), nullable=True),
    sa.Column('assignment_version', sa.Integer(), nullable=True),
    sa.Column('submission_version', sa.Integer(), nullable=True),
    sa.Column('version', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(('author_id',), ['user.id'], ),
    sa.ForeignKeyConstraint(('submission_id',), ['submission.id'], ),
    sa.ForeignKeyConstraint(('tag_id',), ['assignment_tag.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_foreign_key(None, 'submission', 'assignment_group', ['assignment_group_id'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'submission', type_='foreignkey')
    op.drop_table('review')
    # ### end Alembic commands ###

Add Review Table  Revision ID: <PASSWORD> Revises:  Create Date: 2019-08-07 13:09:49.691184 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###