"""change message model to save authors mail instead of id

Revision ID: 000601ed2682
Revises: 30ba8f07b7e3
Create Date: 2019-05-23 14:38:09.782232

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '000601ed2682'
down_revision = '30ba8f07b7e3'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('message', sa.Column('author_mail', sa.String(length=100), nullable=True))
    op.drop_column('message', 'author_id')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('message', sa.Column('author_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.drop_column('message', 'author_mail')
    # ### end Alembic commands ###
