"""add fields to github_orgs and github_users

Revision ID: 4e8693037e72
Revises: 919b1bc74839
Create Date: 2021-01-04 18:38:11.320122

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '4e8693037e72'
down_revision = '919b1bc74839'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('github_orgs', schema=None) as batch_op:
        batch_op.add_column(sa.Column('avatar_url', sa.Text(), nullable=True))
        batch_op.add_column(sa.Column('url', sa.Text(), nullable=True))

    with op.batch_alter_table('github_users', schema=None) as batch_op:
        batch_op.add_column(sa.Column('url', sa.Text(), nullable=True))

    # ### end Alembic commands ###


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

    with op.batch_alter_table('github_orgs', schema=None) as batch_op:
        batch_op.drop_column('url')
        batch_op.drop_column('avatar_url')

    # ### end Alembic commands ###
