"""table UploadedFiles

Revision ID: 2c4ddaeff8ba
Revises: 
Create Date: 2019-08-17 00:27:03.669177

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '2c4ddaeff8ba'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('uploadedfiles',
    sa.Column('is_deleted', sa.Boolean(), nullable=False),
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('filename', sa.String(length=5000), nullable=False),
    sa.Column('filehash', sa.String(length=128), nullable=False),
    sa.Column('filemd5', sa.String(length=128), nullable=False),
    sa.Column('uploaded_time', sa.DateTime(), nullable=False),
    sa.Column('mimetype', sa.String(length=256), nullable=False),
    sa.Column('size', sa.Integer(), nullable=False),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('filehash'),
    sa.UniqueConstraint('filemd5')
    )
    # ### end Alembic commands ###


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