"""Added autoapprove column for oauth client.

Revision ID: 776b0d9121b7
Revises: da<PASSWORD>
Create Date: 2018-05-07 21:17:21.013289

"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, relationship

# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = 'c008583e8f8d'

Base = declarative_base()
db = sa
db.Model = Base
db.relationship = relationship


def create_session():
    connection = op.get_bind()
    session_maker = sa.orm.sessionmaker()
    session = session_maker(bind=connection)
    db.session = session


def upgrade():
    create_session()

    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('oauth_client',
                  sa.Column('auto_approve', sa.Boolean(), nullable=False))
    # ### end Alembic commands ###


def downgrade():
    create_session()

    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('oauth_client', 'auto_approve')
    # ### end Alembic commands ###

# vim: ft=python

"""Added autoapprove column for oauth client.

Revision ID: 776b0d9121b7
Revises: da<PASSWORD>
Create Date: 2018-05-07 21:17:21.013289

"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, relationship

# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = 'c008583e8f8d'

Base = declarative_base()
db = sa
db.Model = Base
db.relationship = relationship


def create_session():
    connection = op.get_bind()
    session_maker = sa.orm.sessionmaker()
    session = session_maker(bind=connection)
    db.session = session


def upgrade():
    create_session()

    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('oauth_client',
                  sa.Column('auto_approve', sa.Boolean(), nullable=False))
    # ### end Alembic commands ###


def downgrade():
    create_session()

    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('oauth_client', 'auto_approve')
    # ### end Alembic commands ###

# vim: ft=python

Added autoapprove column for oauth client.  Revision ID: 776b0d9121b7 Revises: da<PASSWORD> Create Date: 2018-05-07 21:17:21.013289 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # vim: ft=python