<gh_stars>0
"""Change Roles model

Revision ID: d224c5d59d79
Revises: 2ca03e41c546
Create Date: 2020-02-21 10:34:19.288084

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'd<PASSWORD>'
down_revision = '2ca03e41c546'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('ix_roles_default', table_name='roles')
    op.drop_constraint('roles_name_key', 'roles', type_='unique')
    op.drop_column('roles', 'permissions')
    op.drop_column('roles', 'default')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('roles', sa.Column('default', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.add_column('roles', sa.Column('permissions', sa.INTEGER(), autoincrement=False, nullable=True))
    op.create_unique_constraint('roles_name_key', 'roles', ['name'])
    op.create_index('ix_roles_default', 'roles', ['default'], unique=False)
    # ### end Alembic commands ###

"""Change Roles model

Revision ID: d224c5d59d79
Revises: 2ca03e41c546
Create Date: 2020-02-21 10:34:19.288084

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'd<PASSWORD>'
down_revision = '2ca03e41c546'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('ix_roles_default', table_name='roles')
    op.drop_constraint('roles_name_key', 'roles', type_='unique')
    op.drop_column('roles', 'permissions')
    op.drop_column('roles', 'default')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('roles', sa.Column('default', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.add_column('roles', sa.Column('permissions', sa.INTEGER(), autoincrement=False, nullable=True))
    op.create_unique_constraint('roles_name_key', 'roles', ['name'])
    op.create_index('ix_roles_default', 'roles', ['default'], unique=False)
    # ### end Alembic commands ###
Change Roles model  Revision ID: d224c5d59d79 Revises: 2ca03e41c546 Create Date: 2020-02-21 10:34:19.288084 # 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 ###