"""empty message

Revision ID: d46fd374d5ed
Revises: d3adff4549d3
Create Date: 2020-02-27 12:41:01.429479

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

# revision identifiers, used by Alembic.
revision = 'd46fd374d5ed'
down_revision = 'd3adff4549d3'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('message', sa.Column('data', sa.DateTime(), nullable=False))
    op.drop_column('message', 'date')
    op.alter_column('user', 'img',
               existing_type=sa.VARCHAR(length=128),
               nullable=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('user', 'img',
               existing_type=sa.VARCHAR(length=128),
               nullable=False)
    op.add_column('message', sa.Column('date', postgresql.TIMESTAMP(), autoincrement=False, nullable=False))
    op.drop_column('message', 'data')
    # ### end Alembic commands ###
