"""rename boolean fields

Revision ID: 1e9417ec75e
Revises: <PASSWORD>b
Create Date: 2014-11-11 15:42:39.769537

"""

# revision identifiers, used by Alembic.
revision = '1e9417ec75e'
down_revision = '<PASSWORD>'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    # op.drop_column('procurement', 'approved')
    op.add_column('procurement', sa.Column('approved', sa.Boolean(), nullable=True, default=False))
    # op.drop_column('product', 'is_generic')
    op.add_column('product', sa.Column('is_generic', sa.Boolean(), nullable=True, default=True))
    # op.drop_column('registration', 'expired')
    op.add_column('registration', sa.Column('expired', sa.Boolean(), nullable=True, default=False))
    # op.drop_column('supplier', 'authorized')
    op.add_column('supplier', sa.Column('authorized', sa.Boolean(), nullable=True, default=False))
    # op.drop_column('user', 'is_admin')
    # op.drop_column('user', 'activated')
    op.add_column('user', sa.Column('activated', sa.Boolean(), nullable=True, default=False))
    op.add_column('user', sa.Column('is_admin', sa.Boolean(), nullable=True, default=False))
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('tmp_activated', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.add_column('user', sa.Column('tmp_is_admin', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.drop_column('user', 'is_admin')
    op.drop_column('user', 'activated')
    op.add_column('supplier', sa.Column('tmp_authorized', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.drop_column('supplier', 'authorized')
    op.add_column('registration', sa.Column('tmp_expired', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.drop_column('registration', 'expired')
    op.add_column('product', sa.Column('tmp_is_generic', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.drop_column('product', 'is_generic')
    op.add_column('procurement', sa.Column('tmp_approved', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.drop_column('procurement', 'approved')
    ### end Alembic commands ###

"""rename boolean fields

Revision ID: 1e9417ec75e
Revises: <PASSWORD>b
Create Date: 2014-11-11 15:42:39.769537

"""

# revision identifiers, used by Alembic.
revision = '1e9417ec75e'
down_revision = '<PASSWORD>'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    # op.drop_column('procurement', 'approved')
    op.add_column('procurement', sa.Column('approved', sa.Boolean(), nullable=True, default=False))
    # op.drop_column('product', 'is_generic')
    op.add_column('product', sa.Column('is_generic', sa.Boolean(), nullable=True, default=True))
    # op.drop_column('registration', 'expired')
    op.add_column('registration', sa.Column('expired', sa.Boolean(), nullable=True, default=False))
    # op.drop_column('supplier', 'authorized')
    op.add_column('supplier', sa.Column('authorized', sa.Boolean(), nullable=True, default=False))
    # op.drop_column('user', 'is_admin')
    # op.drop_column('user', 'activated')
    op.add_column('user', sa.Column('activated', sa.Boolean(), nullable=True, default=False))
    op.add_column('user', sa.Column('is_admin', sa.Boolean(), nullable=True, default=False))
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('tmp_activated', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.add_column('user', sa.Column('tmp_is_admin', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.drop_column('user', 'is_admin')
    op.drop_column('user', 'activated')
    op.add_column('supplier', sa.Column('tmp_authorized', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.drop_column('supplier', 'authorized')
    op.add_column('registration', sa.Column('tmp_expired', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.drop_column('registration', 'expired')
    op.add_column('product', sa.Column('tmp_is_generic', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.drop_column('product', 'is_generic')
    op.add_column('procurement', sa.Column('tmp_approved', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.drop_column('procurement', 'approved')
    ### end Alembic commands ###

rename boolean fields  Revision ID: 1e9417ec75e Revises: <PASSWORD>b Create Date: 2014-11-11 15:42:39.769537 # revision identifiers, used by Alembic. ### commands auto generated by Alembic - please adjust! ### # op.drop_column('procurement', 'approved') # op.drop_column('product', 'is_generic') # op.drop_column('registration', 'expired') # op.drop_column('supplier', 'authorized') # op.drop_column('user', 'is_admin') # op.drop_column('user', 'activated') ### end Alembic commands ### ### commands auto generated by Alembic - please adjust! ### ### end Alembic commands ###