"""Migration23

Revision ID: 71e843ea1aee
Revises: c1fb4c846419
Create Date: 2021-03-07 23:12:37.439124

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '71e843ea1aee'
down_revision = 'c1fb4c846419'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('files',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('fileuploaded', sa.LargeBinary(), nullable=True),
    sa.Column('file_name', sa.String(), nullable=False),
    sa.Column('date_posted', sa.DateTime(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('task_id', sa.Integer(), nullable=False),
    sa.Column('group_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['group_id'], ['group.id'], ),
    sa.ForeignKeyConstraint(['task_id'], ['task.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.drop_table('file')
    op.alter_column('group', 'joincode',
               existing_type=sa.VARCHAR(length=10),
               type_=sa.String(length=20),
               existing_nullable=False)
    op.create_foreign_key(None, 'user', 'group', ['group_id'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'user', type_='foreignkey')
    op.alter_column('group', 'joincode',
               existing_type=sa.String(length=20),
               type_=sa.VARCHAR(length=10),
               existing_nullable=False)
    op.create_table('file',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('fileuploaded', sa.VARCHAR(length=20), nullable=False),
    sa.Column('date_posted', sa.DATETIME(), nullable=False),
    sa.Column('user_id', sa.INTEGER(), nullable=False),
    sa.Column('task_id', sa.INTEGER(), nullable=False),
    sa.Column('group_id', sa.INTEGER(), nullable=False),
    sa.Column('file_name', sa.VARCHAR(), nullable=False),
    sa.ForeignKeyConstraint(['group_id'], ['group.id'], ),
    sa.ForeignKeyConstraint(['task_id'], ['task.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.drop_table('files')
    # ### end Alembic commands ###

8e2e246dbeb49c29d3c85d3bc5f6fa19402fedbe
<mask token>


def upgrade():
    op.create_table('files', sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('fileuploaded', sa.LargeBinary(), nullable=True), sa.
        Column('file_name', sa.String(), nullable=False), sa.Column(
        'date_posted', sa.DateTime(), nullable=False), sa.Column('user_id',
        sa.Integer(), nullable=False), sa.Column('task_id', sa.Integer(),
        nullable=False), sa.Column('group_id', sa.Integer(), nullable=False
        ), sa.ForeignKeyConstraint(['group_id'], ['group.id']), sa.
        ForeignKeyConstraint(['task_id'], ['task.id']), sa.
        ForeignKeyConstraint(['user_id'], ['user.id']), sa.
        PrimaryKeyConstraint('id'))
    op.drop_table('file')
    op.alter_column('group', 'joincode', existing_type=sa.VARCHAR(length=10
        ), type_=sa.String(length=20), existing_nullable=False)
    op.create_foreign_key(None, 'user', 'group', ['group_id'], ['id'])


<mask token>

<mask token>


def upgrade():
    op.create_table('files', sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('fileuploaded', sa.LargeBinary(), nullable=True), sa.
        Column('file_name', sa.String(), nullable=False), sa.Column(
        'date_posted', sa.DateTime(), nullable=False), sa.Column('user_id',
        sa.Integer(), nullable=False), sa.Column('task_id', sa.Integer(),
        nullable=False), sa.Column('group_id', sa.Integer(), nullable=False
        ), sa.ForeignKeyConstraint(['group_id'], ['group.id']), sa.
        ForeignKeyConstraint(['task_id'], ['task.id']), sa.
        ForeignKeyConstraint(['user_id'], ['user.id']), sa.
        PrimaryKeyConstraint('id'))
    op.drop_table('file')
    op.alter_column('group', 'joincode', existing_type=sa.VARCHAR(length=10
        ), type_=sa.String(length=20), existing_nullable=False)
    op.create_foreign_key(None, 'user', 'group', ['group_id'], ['id'])


def downgrade():
    op.drop_constraint(None, 'user', type_='foreignkey')
    op.alter_column('group', 'joincode', existing_type=sa.String(length=20),
        type_=sa.VARCHAR(length=10), existing_nullable=False)
    op.create_table('file', sa.Column('id', sa.INTEGER(), nullable=False),
        sa.Column('fileuploaded', sa.VARCHAR(length=20), nullable=False),
        sa.Column('date_posted', sa.DATETIME(), nullable=False), sa.Column(
        'user_id', sa.INTEGER(), nullable=False), sa.Column('task_id', sa.
        INTEGER(), nullable=False), sa.Column('group_id', sa.INTEGER(),
        nullable=False), sa.Column('file_name', sa.VARCHAR(), nullable=
        False), sa.ForeignKeyConstraint(['group_id'], ['group.id']), sa.
        ForeignKeyConstraint(['task_id'], ['task.id']), sa.
        ForeignKeyConstraint(['user_id'], ['user.id']), sa.
        PrimaryKeyConstraint('id'))
    op.drop_table('files')

<mask token>
revision = '71e843ea1aee'
down_revision = 'c1fb4c846419'
branch_labels = None
depends_on = None


def upgrade():
    op.create_table('files', sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('fileuploaded', sa.LargeBinary(), nullable=True), sa.
        Column('file_name', sa.String(), nullable=False), sa.Column(
        'date_posted', sa.DateTime(), nullable=False), sa.Column('user_id',
        sa.Integer(), nullable=False), sa.Column('task_id', sa.Integer(),
        nullable=False), sa.Column('group_id', sa.Integer(), nullable=False
        ), sa.ForeignKeyConstraint(['group_id'], ['group.id']), sa.
        ForeignKeyConstraint(['task_id'], ['task.id']), sa.
        ForeignKeyConstraint(['user_id'], ['user.id']), sa.
        PrimaryKeyConstraint('id'))
    op.drop_table('file')
    op.alter_column('group', 'joincode', existing_type=sa.VARCHAR(length=10
        ), type_=sa.String(length=20), existing_nullable=False)
    op.create_foreign_key(None, 'user', 'group', ['group_id'], ['id'])


def downgrade():
    op.drop_constraint(None, 'user', type_='foreignkey')
    op.alter_column('group', 'joincode', existing_type=sa.String(length=20),
        type_=sa.VARCHAR(length=10), existing_nullable=False)
    op.create_table('file', sa.Column('id', sa.INTEGER(), nullable=False),
        sa.Column('fileuploaded', sa.VARCHAR(length=20), nullable=False),
        sa.Column('date_posted', sa.DATETIME(), nullable=False), sa.Column(
        'user_id', sa.INTEGER(), nullable=False), sa.Column('task_id', sa.
        INTEGER(), nullable=False), sa.Column('group_id', sa.INTEGER(),
        nullable=False), sa.Column('file_name', sa.VARCHAR(), nullable=
        False), sa.ForeignKeyConstraint(['group_id'], ['group.id']), sa.
        ForeignKeyConstraint(['task_id'], ['task.id']), sa.
        ForeignKeyConstraint(['user_id'], ['user.id']), sa.
        PrimaryKeyConstraint('id'))
    op.drop_table('files')

<mask token>
from alembic import op
import sqlalchemy as sa
revision = '71e843ea1aee'
down_revision = 'c1fb4c846419'
branch_labels = None
depends_on = None


def upgrade():
    op.create_table('files', sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('fileuploaded', sa.LargeBinary(), nullable=True), sa.
        Column('file_name', sa.String(), nullable=False), sa.Column(
        'date_posted', sa.DateTime(), nullable=False), sa.Column('user_id',
        sa.Integer(), nullable=False), sa.Column('task_id', sa.Integer(),
        nullable=False), sa.Column('group_id', sa.Integer(), nullable=False
        ), sa.ForeignKeyConstraint(['group_id'], ['group.id']), sa.
        ForeignKeyConstraint(['task_id'], ['task.id']), sa.
        ForeignKeyConstraint(['user_id'], ['user.id']), sa.
        PrimaryKeyConstraint('id'))
    op.drop_table('file')
    op.alter_column('group', 'joincode', existing_type=sa.VARCHAR(length=10
        ), type_=sa.String(length=20), existing_nullable=False)
    op.create_foreign_key(None, 'user', 'group', ['group_id'], ['id'])


def downgrade():
    op.drop_constraint(None, 'user', type_='foreignkey')
    op.alter_column('group', 'joincode', existing_type=sa.String(length=20),
        type_=sa.VARCHAR(length=10), existing_nullable=False)
    op.create_table('file', sa.Column('id', sa.INTEGER(), nullable=False),
        sa.Column('fileuploaded', sa.VARCHAR(length=20), nullable=False),
        sa.Column('date_posted', sa.DATETIME(), nullable=False), sa.Column(
        'user_id', sa.INTEGER(), nullable=False), sa.Column('task_id', sa.
        INTEGER(), nullable=False), sa.Column('group_id', sa.INTEGER(),
        nullable=False), sa.Column('file_name', sa.VARCHAR(), nullable=
        False), sa.ForeignKeyConstraint(['group_id'], ['group.id']), sa.
        ForeignKeyConstraint(['task_id'], ['task.id']), sa.
        ForeignKeyConstraint(['user_id'], ['user.id']), sa.
        PrimaryKeyConstraint('id'))
    op.drop_table('files')

"""Migration23

Revision ID: 71e843ea1aee
Revises: c1fb4c846419
Create Date: 2021-03-07 23:12:37.439124

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '71e843ea1aee'
down_revision = 'c1fb4c846419'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('files',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('fileuploaded', sa.LargeBinary(), nullable=True),
    sa.Column('file_name', sa.String(), nullable=False),
    sa.Column('date_posted', sa.DateTime(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('task_id', sa.Integer(), nullable=False),
    sa.Column('group_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['group_id'], ['group.id'], ),
    sa.ForeignKeyConstraint(['task_id'], ['task.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.drop_table('file')
    op.alter_column('group', 'joincode',
               existing_type=sa.VARCHAR(length=10),
               type_=sa.String(length=20),
               existing_nullable=False)
    op.create_foreign_key(None, 'user', 'group', ['group_id'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'user', type_='foreignkey')
    op.alter_column('group', 'joincode',
               existing_type=sa.String(length=20),
               type_=sa.VARCHAR(length=10),
               existing_nullable=False)
    op.create_table('file',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('fileuploaded', sa.VARCHAR(length=20), nullable=False),
    sa.Column('date_posted', sa.DATETIME(), nullable=False),
    sa.Column('user_id', sa.INTEGER(), nullable=False),
    sa.Column('task_id', sa.INTEGER(), nullable=False),
    sa.Column('group_id', sa.INTEGER(), nullable=False),
    sa.Column('file_name', sa.VARCHAR(), nullable=False),
    sa.ForeignKeyConstraint(['group_id'], ['group.id'], ),
    sa.ForeignKeyConstraint(['task_id'], ['task.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.drop_table('files')
    # ### end Alembic commands ###
