"""empty message

Revision ID: f6d212285b95
Revises: bd43820398dc
Create Date: 2019-05-06 17:55:09.502618

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

# revision identifiers, used by Alembic.
revision = 'f6d212285b95'
down_revision = 'bd43820398dc'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('file', sa.Column('content', sa.LargeBinary(), nullable=True))
    op.add_column('file', sa.Column('expire_at', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=True))
    op.add_column('file', sa.Column('filename', sa.String(), nullable=False))
    op.drop_column('file', 'live_time')
    op.drop_column('file', 'file')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('file', sa.Column('file', postgresql.BYTEA(), autoincrement=False, nullable=True))
    op.add_column('file', sa.Column('live_time', postgresql.TIMESTAMP(), server_default=sa.text('CURRENT_TIMESTAMP'), autoincrement=False, nullable=True))
    op.drop_column('file', 'filename')
    op.drop_column('file', 'expire_at')
    op.drop_column('file', 'content')
    # ### end Alembic commands ###
