"""Add messenger domain to db

Revision ID: 3c59aa2a3af9
Revises: 2162f7ae5365
Create Date: 2020-08-31 18:48:20.989464

"""
from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision = '3c59aa2a3af9'
down_revision = '2162f7ae5365'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('user', schema=None) as batch_op:
        batch_op.add_column(sa.Column('fb_domain', sa.String(length=255), nullable=False,
                                      server_default="messenger.com"))

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('user', schema=None) as batch_op:
        batch_op.drop_column('fb_domain')

    # ### end Alembic commands ###
