"""empty message

Revision ID: e6f3638c1fe2
Revises: 77585914594c
Create Date: 2020-12-02 12:31:25.131671

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'e6f3638c1fe2'
down_revision = '77585914594c'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('cmf_bill_executors',
    sa.Column('description', sa.String(length=4096), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('left_id', sa.CHAR(length=64), nullable=True),
    sa.Column('left_name_cache', sa.String(length=256), nullable=True),
    sa.Column('parent_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_name_cache', sa.String(length=256), nullable=True),
    sa.Column('root_id', sa.CHAR(length=64), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_bill_executors_left_id'), 'cmf_bill_executors', ['left_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_executors_parent_id'), 'cmf_bill_executors', ['parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_executors_right_id'), 'cmf_bill_executors', ['right_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_executors_root_id'), 'cmf_bill_executors', ['root_id'], unique=False)
    op.create_table('cmf_bill_related_objects',
    sa.Column('description', sa.String(length=4096), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('left_id', sa.CHAR(length=64), nullable=True),
    sa.Column('left_name_cache', sa.String(length=256), nullable=True),
    sa.Column('parent_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_name_cache', sa.String(length=256), nullable=True),
    sa.Column('root_id', sa.CHAR(length=64), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_bill_related_objects_left_id'), 'cmf_bill_related_objects', ['left_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_related_objects_parent_id'), 'cmf_bill_related_objects', ['parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_related_objects_right_id'), 'cmf_bill_related_objects', ['right_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_related_objects_root_id'), 'cmf_bill_related_objects', ['root_id'], unique=False)
    op.create_table('cmf_bill_spectators',
    sa.Column('description', sa.String(length=4096), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('left_id', sa.CHAR(length=64), nullable=True),
    sa.Column('left_name_cache', sa.String(length=256), nullable=True),
    sa.Column('parent_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_name_cache', sa.String(length=256), nullable=True),
    sa.Column('root_id', sa.CHAR(length=64), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_bill_spectators_left_id'), 'cmf_bill_spectators', ['left_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_spectators_parent_id'), 'cmf_bill_spectators', ['parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_spectators_right_id'), 'cmf_bill_spectators', ['right_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_spectators_root_id'), 'cmf_bill_spectators', ['root_id'], unique=False)
    op.create_table('cmf_currency',
    sa.Column('cmf_author_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_created_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_deleted', sa.Boolean(), nullable=False),
    sa.Column('cmf_locked_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_locked_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_modified_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_modified_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_owner_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_version', sa.Integer(), nullable=True),
    sa.Column('cmf_viewed_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('code', sa.String(length=64), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('name', sa.String(length=256), nullable=True),
    sa.Column('text', sa.TEXT(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_currency_cmf_author_id'), 'cmf_currency', ['cmf_author_id'], unique=False)
    op.create_index(op.f('ix_cmf_currency_cmf_created_at'), 'cmf_currency', ['cmf_created_at'], unique=False)
    op.create_index(op.f('ix_cmf_currency_cmf_locked_by_id'), 'cmf_currency', ['cmf_locked_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_currency_cmf_modified_by_id'), 'cmf_currency', ['cmf_modified_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_currency_cmf_owner_id'), 'cmf_currency', ['cmf_owner_id'], unique=False)
    op.create_index(op.f('ix_cmf_currency_code'), 'cmf_currency', ['code'], unique=True)
    op.create_index(op.f('ix_cmf_currency_name'), 'cmf_currency', ['name'], unique=False)
    op.create_table('cmf_deal_executors',
    sa.Column('description', sa.String(length=4096), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('left_id', sa.CHAR(length=64), nullable=True),
    sa.Column('left_name_cache', sa.String(length=256), nullable=True),
    sa.Column('parent_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_name_cache', sa.String(length=256), nullable=True),
    sa.Column('root_id', sa.CHAR(length=64), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_deal_executors_left_id'), 'cmf_deal_executors', ['left_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_executors_parent_id'), 'cmf_deal_executors', ['parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_executors_right_id'), 'cmf_deal_executors', ['right_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_executors_root_id'), 'cmf_deal_executors', ['root_id'], unique=False)
    op.create_table('cmf_deal_related_objects',
    sa.Column('description', sa.String(length=4096), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('left_id', sa.CHAR(length=64), nullable=True),
    sa.Column('left_name_cache', sa.String(length=256), nullable=True),
    sa.Column('parent_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_name_cache', sa.String(length=256), nullable=True),
    sa.Column('root_id', sa.CHAR(length=64), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_deal_related_objects_left_id'), 'cmf_deal_related_objects', ['left_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_related_objects_parent_id'), 'cmf_deal_related_objects', ['parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_related_objects_right_id'), 'cmf_deal_related_objects', ['right_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_related_objects_root_id'), 'cmf_deal_related_objects', ['root_id'], unique=False)
    op.create_table('cmf_deal_spectators',
    sa.Column('description', sa.String(length=4096), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('left_id', sa.CHAR(length=64), nullable=True),
    sa.Column('left_name_cache', sa.String(length=256), nullable=True),
    sa.Column('parent_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_name_cache', sa.String(length=256), nullable=True),
    sa.Column('root_id', sa.CHAR(length=64), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_deal_spectators_left_id'), 'cmf_deal_spectators', ['left_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_spectators_parent_id'), 'cmf_deal_spectators', ['parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_spectators_right_id'), 'cmf_deal_spectators', ['right_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_spectators_root_id'), 'cmf_deal_spectators', ['root_id'], unique=False)
    op.create_table('cmf_integration',
    sa.Column('cmf_author_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_created_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_deleted', sa.Boolean(), nullable=False),
    sa.Column('cmf_locked_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_locked_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_modified_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_modified_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_owner_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_version', sa.Integer(), nullable=True),
    sa.Column('cmf_viewed_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('code', sa.String(length=64), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('name', sa.String(length=256), nullable=True),
    sa.Column('text', sa.TEXT(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_integration_cmf_author_id'), 'cmf_integration', ['cmf_author_id'], unique=False)
    op.create_index(op.f('ix_cmf_integration_cmf_created_at'), 'cmf_integration', ['cmf_created_at'], unique=False)
    op.create_index(op.f('ix_cmf_integration_cmf_locked_by_id'), 'cmf_integration', ['cmf_locked_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_integration_cmf_modified_by_id'), 'cmf_integration', ['cmf_modified_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_integration_cmf_owner_id'), 'cmf_integration', ['cmf_owner_id'], unique=False)
    op.create_index(op.f('ix_cmf_integration_code'), 'cmf_integration', ['code'], unique=True)
    op.create_index(op.f('ix_cmf_integration_name'), 'cmf_integration', ['name'], unique=False)
    op.create_table('cmf_lead_executors',
    sa.Column('description', sa.String(length=4096), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('left_id', sa.CHAR(length=64), nullable=True),
    sa.Column('left_name_cache', sa.String(length=256), nullable=True),
    sa.Column('parent_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_name_cache', sa.String(length=256), nullable=True),
    sa.Column('root_id', sa.CHAR(length=64), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_lead_executors_left_id'), 'cmf_lead_executors', ['left_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_executors_parent_id'), 'cmf_lead_executors', ['parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_executors_right_id'), 'cmf_lead_executors', ['right_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_executors_root_id'), 'cmf_lead_executors', ['root_id'], unique=False)
    op.create_table('cmf_lead_related_objects',
    sa.Column('description', sa.String(length=4096), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('left_id', sa.CHAR(length=64), nullable=True),
    sa.Column('left_name_cache', sa.String(length=256), nullable=True),
    sa.Column('parent_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_name_cache', sa.String(length=256), nullable=True),
    sa.Column('root_id', sa.CHAR(length=64), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_lead_related_objects_left_id'), 'cmf_lead_related_objects', ['left_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_related_objects_parent_id'), 'cmf_lead_related_objects', ['parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_related_objects_right_id'), 'cmf_lead_related_objects', ['right_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_related_objects_root_id'), 'cmf_lead_related_objects', ['root_id'], unique=False)
    op.create_table('cmf_lead_spectators',
    sa.Column('description', sa.String(length=4096), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('left_id', sa.CHAR(length=64), nullable=True),
    sa.Column('left_name_cache', sa.String(length=256), nullable=True),
    sa.Column('parent_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_id', sa.CHAR(length=64), nullable=True),
    sa.Column('right_name_cache', sa.String(length=256), nullable=True),
    sa.Column('root_id', sa.CHAR(length=64), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_lead_spectators_left_id'), 'cmf_lead_spectators', ['left_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_spectators_parent_id'), 'cmf_lead_spectators', ['parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_spectators_right_id'), 'cmf_lead_spectators', ['right_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_spectators_root_id'), 'cmf_lead_spectators', ['root_id'], unique=False)
    op.create_table('cmf_price',
    sa.Column('cmf_author_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_created_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_deleted', sa.Boolean(), nullable=False),
    sa.Column('cmf_locked_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_locked_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_modified_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_modified_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_owner_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_version', sa.Integer(), nullable=True),
    sa.Column('cmf_viewed_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('code', sa.String(length=64), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('name', sa.String(length=256), nullable=True),
    sa.Column('text', sa.TEXT(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_price_cmf_author_id'), 'cmf_price', ['cmf_author_id'], unique=False)
    op.create_index(op.f('ix_cmf_price_cmf_created_at'), 'cmf_price', ['cmf_created_at'], unique=False)
    op.create_index(op.f('ix_cmf_price_cmf_locked_by_id'), 'cmf_price', ['cmf_locked_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_price_cmf_modified_by_id'), 'cmf_price', ['cmf_modified_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_price_cmf_owner_id'), 'cmf_price', ['cmf_owner_id'], unique=False)
    op.create_index(op.f('ix_cmf_price_code'), 'cmf_price', ['code'], unique=True)
    op.create_index(op.f('ix_cmf_price_name'), 'cmf_price', ['name'], unique=False)
    op.create_table('cmf_print_tmpl',
    sa.Column('cmf_author_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_created_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_deleted', sa.Boolean(), nullable=False),
    sa.Column('cmf_locked_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_locked_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_modified_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_modified_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_owner_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_version', sa.Integer(), nullable=True),
    sa.Column('cmf_viewed_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('code', sa.String(length=64), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('name', sa.String(length=256), nullable=True),
    sa.Column('text', sa.TEXT(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_print_tmpl_cmf_author_id'), 'cmf_print_tmpl', ['cmf_author_id'], unique=False)
    op.create_index(op.f('ix_cmf_print_tmpl_cmf_created_at'), 'cmf_print_tmpl', ['cmf_created_at'], unique=False)
    op.create_index(op.f('ix_cmf_print_tmpl_cmf_locked_by_id'), 'cmf_print_tmpl', ['cmf_locked_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_print_tmpl_cmf_modified_by_id'), 'cmf_print_tmpl', ['cmf_modified_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_print_tmpl_cmf_owner_id'), 'cmf_print_tmpl', ['cmf_owner_id'], unique=False)
    op.create_index(op.f('ix_cmf_print_tmpl_code'), 'cmf_print_tmpl', ['code'], unique=True)
    op.create_index(op.f('ix_cmf_print_tmpl_name'), 'cmf_print_tmpl', ['name'], unique=False)
    op.create_table('cmf_subscription',
    sa.Column('cmf_author_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_created_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_deleted', sa.Boolean(), nullable=False),
    sa.Column('cmf_locked_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_locked_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_modified_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_modified_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_owner_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_version', sa.Integer(), nullable=True),
    sa.Column('cmf_viewed_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('code', sa.String(length=64), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('name', sa.String(length=256), nullable=True),
    sa.Column('text', sa.TEXT(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_subscription_cmf_author_id'), 'cmf_subscription', ['cmf_author_id'], unique=False)
    op.create_index(op.f('ix_cmf_subscription_cmf_created_at'), 'cmf_subscription', ['cmf_created_at'], unique=False)
    op.create_index(op.f('ix_cmf_subscription_cmf_locked_by_id'), 'cmf_subscription', ['cmf_locked_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_subscription_cmf_modified_by_id'), 'cmf_subscription', ['cmf_modified_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_subscription_cmf_owner_id'), 'cmf_subscription', ['cmf_owner_id'], unique=False)
    op.create_index(op.f('ix_cmf_subscription_code'), 'cmf_subscription', ['code'], unique=True)
    op.create_index(op.f('ix_cmf_subscription_name'), 'cmf_subscription', ['name'], unique=False)
    op.create_table('cmf_unit',
    sa.Column('cmf_author_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_created_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_deleted', sa.Boolean(), nullable=False),
    sa.Column('cmf_locked_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_locked_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_modified_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_modified_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_owner_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_version', sa.Integer(), nullable=True),
    sa.Column('cmf_viewed_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('code', sa.String(length=64), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('name', sa.String(length=256), nullable=True),
    sa.Column('text', sa.TEXT(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_unit_cmf_author_id'), 'cmf_unit', ['cmf_author_id'], unique=False)
    op.create_index(op.f('ix_cmf_unit_cmf_created_at'), 'cmf_unit', ['cmf_created_at'], unique=False)
    op.create_index(op.f('ix_cmf_unit_cmf_locked_by_id'), 'cmf_unit', ['cmf_locked_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_unit_cmf_modified_by_id'), 'cmf_unit', ['cmf_modified_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_unit_cmf_owner_id'), 'cmf_unit', ['cmf_owner_id'], unique=False)
    op.create_index(op.f('ix_cmf_unit_code'), 'cmf_unit', ['code'], unique=True)
    op.create_index(op.f('ix_cmf_unit_name'), 'cmf_unit', ['name'], unique=False)
    op.create_table('cmf_product',
    sa.Column('cmf_author_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_created_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_deleted', sa.Boolean(), nullable=False),
    sa.Column('cmf_locked_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_locked_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_modified_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_modified_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_owner_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_version', sa.Integer(), nullable=True),
    sa.Column('cmf_viewed_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('code', sa.String(length=64), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('name', sa.String(length=256), nullable=True),
    sa.Column('price', sa.Numeric(precision=14, scale=2), nullable=True),
    sa.Column('tax', sa.String(length=32), nullable=True),
    sa.Column('text', sa.TEXT(), nullable=True),
    sa.Column('unit_id', sa.CHAR(length=64), nullable=True),
    sa.ForeignKeyConstraint(['unit_id'], ['cmf_unit.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_product_cmf_author_id'), 'cmf_product', ['cmf_author_id'], unique=False)
    op.create_index(op.f('ix_cmf_product_cmf_created_at'), 'cmf_product', ['cmf_created_at'], unique=False)
    op.create_index(op.f('ix_cmf_product_cmf_locked_by_id'), 'cmf_product', ['cmf_locked_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_product_cmf_modified_by_id'), 'cmf_product', ['cmf_modified_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_product_cmf_owner_id'), 'cmf_product', ['cmf_owner_id'], unique=False)
    op.create_index(op.f('ix_cmf_product_code'), 'cmf_product', ['code'], unique=True)
    op.create_index(op.f('ix_cmf_product_name'), 'cmf_product', ['name'], unique=False)
    op.create_index(op.f('ix_cmf_product_unit_id'), 'cmf_product', ['unit_id'], unique=False)
    op.create_table('cmf_bill',
    sa.Column('activity_id', sa.CHAR(length=64), nullable=True),
    sa.Column('alarm_date', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cache_status_type', sa.String(length=32), nullable=True),
    sa.Column('cmf_author_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_created_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_deleted', sa.Boolean(), nullable=False),
    sa.Column('cmf_locked_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_locked_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_modified_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_modified_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_owner_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_version', sa.Integer(), nullable=True),
    sa.Column('cmf_viewed_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('code', sa.String(length=64), nullable=True),
    sa.Column('company_id', sa.CHAR(length=64), nullable=True),
    sa.Column('deadline', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('is_penalty', sa.Boolean(), nullable=True),
    sa.Column('mark', sa.String(length=32), nullable=True),
    sa.Column('name', sa.String(length=256), nullable=True),
    sa.Column('no_control', sa.Boolean(), nullable=True),
    sa.Column('orderno', sa.Integer(), nullable=True),
    sa.Column('parent_task_id', sa.CHAR(length=64), nullable=True),
    sa.Column('period_clone_from_id', sa.CHAR(length=64), nullable=True),
    sa.Column('period_interval', sa.String(length=32), nullable=True),
    sa.Column('period_next_date', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('plan_end_date', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('plan_start_date', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('priority', sa.String(length=32), nullable=False),
    sa.Column('project_id', sa.CHAR(length=64), nullable=True),
    sa.Column('responsible_id', sa.CHAR(length=64), nullable=True),
    sa.Column('status_id', sa.CHAR(length=64), nullable=True),
    sa.Column('status_modified_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('tags', sa.TEXT(), nullable=True),
    sa.Column('text', sa.TEXT(), nullable=True),
    sa.Column('time_estimate', sa.Integer(), nullable=True),
    sa.Column('tree_parent_id', sa.CHAR(length=64), nullable=True),
    sa.Column('waiting_for_id', sa.CHAR(length=64), nullable=True),
    sa.ForeignKeyConstraint(['activity_id'], ['cmf_activity.id'], ),
    sa.ForeignKeyConstraint(['company_id'], ['cmf_company.id'], ),
    sa.ForeignKeyConstraint(['project_id'], ['cmf_project.id'], ),
    sa.ForeignKeyConstraint(['status_id'], ['cmf_status.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_bill_activity_id'), 'cmf_bill', ['activity_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_alarm_date'), 'cmf_bill', ['alarm_date'], unique=False)
    op.create_index(op.f('ix_cmf_bill_cache_status_type'), 'cmf_bill', ['cache_status_type'], unique=False)
    op.create_index(op.f('ix_cmf_bill_cmf_author_id'), 'cmf_bill', ['cmf_author_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_cmf_created_at'), 'cmf_bill', ['cmf_created_at'], unique=False)
    op.create_index(op.f('ix_cmf_bill_cmf_locked_by_id'), 'cmf_bill', ['cmf_locked_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_cmf_modified_by_id'), 'cmf_bill', ['cmf_modified_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_cmf_owner_id'), 'cmf_bill', ['cmf_owner_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_code'), 'cmf_bill', ['code'], unique=True)
    op.create_index(op.f('ix_cmf_bill_company_id'), 'cmf_bill', ['company_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_name'), 'cmf_bill', ['name'], unique=False)
    op.create_index(op.f('ix_cmf_bill_orderno'), 'cmf_bill', ['orderno'], unique=False)
    op.create_index(op.f('ix_cmf_bill_parent_task_id'), 'cmf_bill', ['parent_task_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_period_clone_from_id'), 'cmf_bill', ['period_clone_from_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_project_id'), 'cmf_bill', ['project_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_responsible_id'), 'cmf_bill', ['responsible_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_status_id'), 'cmf_bill', ['status_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_tree_parent_id'), 'cmf_bill', ['tree_parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_bill_waiting_for_id'), 'cmf_bill', ['waiting_for_id'], unique=False)
    op.create_table('cmf_deal',
    sa.Column('activity_id', sa.CHAR(length=64), nullable=True),
    sa.Column('alarm_date', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cache_status_type', sa.String(length=32), nullable=True),
    sa.Column('cmf_author_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_created_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_deleted', sa.Boolean(), nullable=False),
    sa.Column('cmf_locked_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_locked_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_modified_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_modified_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_owner_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_version', sa.Integer(), nullable=True),
    sa.Column('cmf_viewed_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('code', sa.String(length=64), nullable=True),
    sa.Column('company_id', sa.CHAR(length=64), nullable=True),
    sa.Column('deadline', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('is_penalty', sa.Boolean(), nullable=True),
    sa.Column('mark', sa.String(length=32), nullable=True),
    sa.Column('name', sa.String(length=256), nullable=True),
    sa.Column('no_control', sa.Boolean(), nullable=True),
    sa.Column('orderno', sa.Integer(), nullable=True),
    sa.Column('parent_task_id', sa.CHAR(length=64), nullable=True),
    sa.Column('period_clone_from_id', sa.CHAR(length=64), nullable=True),
    sa.Column('period_interval', sa.String(length=32), nullable=True),
    sa.Column('period_next_date', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('plan_end_date', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('plan_start_date', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('priority', sa.String(length=32), nullable=False),
    sa.Column('project_id', sa.CHAR(length=64), nullable=True),
    sa.Column('responsible_id', sa.CHAR(length=64), nullable=True),
    sa.Column('status_id', sa.CHAR(length=64), nullable=True),
    sa.Column('status_modified_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('tags', sa.TEXT(), nullable=True),
    sa.Column('text', sa.TEXT(), nullable=True),
    sa.Column('time_estimate', sa.Integer(), nullable=True),
    sa.Column('tree_parent_id', sa.CHAR(length=64), nullable=True),
    sa.Column('waiting_for_id', sa.CHAR(length=64), nullable=True),
    sa.ForeignKeyConstraint(['activity_id'], ['cmf_activity.id'], ),
    sa.ForeignKeyConstraint(['company_id'], ['cmf_company.id'], ),
    sa.ForeignKeyConstraint(['project_id'], ['cmf_project.id'], ),
    sa.ForeignKeyConstraint(['status_id'], ['cmf_status.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_deal_activity_id'), 'cmf_deal', ['activity_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_alarm_date'), 'cmf_deal', ['alarm_date'], unique=False)
    op.create_index(op.f('ix_cmf_deal_cache_status_type'), 'cmf_deal', ['cache_status_type'], unique=False)
    op.create_index(op.f('ix_cmf_deal_cmf_author_id'), 'cmf_deal', ['cmf_author_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_cmf_created_at'), 'cmf_deal', ['cmf_created_at'], unique=False)
    op.create_index(op.f('ix_cmf_deal_cmf_locked_by_id'), 'cmf_deal', ['cmf_locked_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_cmf_modified_by_id'), 'cmf_deal', ['cmf_modified_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_cmf_owner_id'), 'cmf_deal', ['cmf_owner_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_code'), 'cmf_deal', ['code'], unique=True)
    op.create_index(op.f('ix_cmf_deal_company_id'), 'cmf_deal', ['company_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_name'), 'cmf_deal', ['name'], unique=False)
    op.create_index(op.f('ix_cmf_deal_orderno'), 'cmf_deal', ['orderno'], unique=False)
    op.create_index(op.f('ix_cmf_deal_parent_task_id'), 'cmf_deal', ['parent_task_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_period_clone_from_id'), 'cmf_deal', ['period_clone_from_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_project_id'), 'cmf_deal', ['project_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_responsible_id'), 'cmf_deal', ['responsible_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_status_id'), 'cmf_deal', ['status_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_tree_parent_id'), 'cmf_deal', ['tree_parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_deal_waiting_for_id'), 'cmf_deal', ['waiting_for_id'], unique=False)
    op.create_table('cmf_lead',
    sa.Column('activity_id', sa.CHAR(length=64), nullable=True),
    sa.Column('alarm_date', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cache_status_type', sa.String(length=32), nullable=True),
    sa.Column('cmf_author_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_created_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_deleted', sa.Boolean(), nullable=False),
    sa.Column('cmf_locked_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_locked_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_modified_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_modified_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_owner_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_version', sa.Integer(), nullable=True),
    sa.Column('cmf_viewed_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('code', sa.String(length=64), nullable=True),
    sa.Column('company_id', sa.CHAR(length=64), nullable=True),
    sa.Column('deadline', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('is_penalty', sa.Boolean(), nullable=True),
    sa.Column('mark', sa.String(length=32), nullable=True),
    sa.Column('name', sa.String(length=256), nullable=True),
    sa.Column('no_control', sa.Boolean(), nullable=True),
    sa.Column('orderno', sa.Integer(), nullable=True),
    sa.Column('parent_task_id', sa.CHAR(length=64), nullable=True),
    sa.Column('period_clone_from_id', sa.CHAR(length=64), nullable=True),
    sa.Column('period_interval', sa.String(length=32), nullable=True),
    sa.Column('period_next_date', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('plan_end_date', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('plan_start_date', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('priority', sa.String(length=32), nullable=False),
    sa.Column('project_id', sa.CHAR(length=64), nullable=True),
    sa.Column('responsible_id', sa.CHAR(length=64), nullable=True),
    sa.Column('status_id', sa.CHAR(length=64), nullable=True),
    sa.Column('status_modified_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('tags', sa.TEXT(), nullable=True),
    sa.Column('text', sa.TEXT(), nullable=True),
    sa.Column('time_estimate', sa.Integer(), nullable=True),
    sa.Column('tree_parent_id', sa.CHAR(length=64), nullable=True),
    sa.Column('waiting_for_id', sa.CHAR(length=64), nullable=True),
    sa.ForeignKeyConstraint(['activity_id'], ['cmf_activity.id'], ),
    sa.ForeignKeyConstraint(['company_id'], ['cmf_company.id'], ),
    sa.ForeignKeyConstraint(['project_id'], ['cmf_project.id'], ),
    sa.ForeignKeyConstraint(['status_id'], ['cmf_status.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_lead_activity_id'), 'cmf_lead', ['activity_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_alarm_date'), 'cmf_lead', ['alarm_date'], unique=False)
    op.create_index(op.f('ix_cmf_lead_cache_status_type'), 'cmf_lead', ['cache_status_type'], unique=False)
    op.create_index(op.f('ix_cmf_lead_cmf_author_id'), 'cmf_lead', ['cmf_author_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_cmf_created_at'), 'cmf_lead', ['cmf_created_at'], unique=False)
    op.create_index(op.f('ix_cmf_lead_cmf_locked_by_id'), 'cmf_lead', ['cmf_locked_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_cmf_modified_by_id'), 'cmf_lead', ['cmf_modified_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_cmf_owner_id'), 'cmf_lead', ['cmf_owner_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_code'), 'cmf_lead', ['code'], unique=True)
    op.create_index(op.f('ix_cmf_lead_company_id'), 'cmf_lead', ['company_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_name'), 'cmf_lead', ['name'], unique=False)
    op.create_index(op.f('ix_cmf_lead_orderno'), 'cmf_lead', ['orderno'], unique=False)
    op.create_index(op.f('ix_cmf_lead_parent_task_id'), 'cmf_lead', ['parent_task_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_period_clone_from_id'), 'cmf_lead', ['period_clone_from_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_project_id'), 'cmf_lead', ['project_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_responsible_id'), 'cmf_lead', ['responsible_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_status_id'), 'cmf_lead', ['status_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_tree_parent_id'), 'cmf_lead', ['tree_parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_lead_waiting_for_id'), 'cmf_lead', ['waiting_for_id'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_cmf_lead_waiting_for_id'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_tree_parent_id'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_status_id'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_responsible_id'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_project_id'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_period_clone_from_id'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_parent_task_id'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_orderno'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_name'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_company_id'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_code'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_cmf_owner_id'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_cmf_modified_by_id'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_cmf_locked_by_id'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_cmf_created_at'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_cmf_author_id'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_cache_status_type'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_alarm_date'), table_name='cmf_lead')
    op.drop_index(op.f('ix_cmf_lead_activity_id'), table_name='cmf_lead')
    op.drop_table('cmf_lead')
    op.drop_index(op.f('ix_cmf_deal_waiting_for_id'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_tree_parent_id'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_status_id'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_responsible_id'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_project_id'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_period_clone_from_id'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_parent_task_id'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_orderno'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_name'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_company_id'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_code'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_cmf_owner_id'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_cmf_modified_by_id'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_cmf_locked_by_id'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_cmf_created_at'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_cmf_author_id'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_cache_status_type'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_alarm_date'), table_name='cmf_deal')
    op.drop_index(op.f('ix_cmf_deal_activity_id'), table_name='cmf_deal')
    op.drop_table('cmf_deal')
    op.drop_index(op.f('ix_cmf_bill_waiting_for_id'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_tree_parent_id'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_status_id'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_responsible_id'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_project_id'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_period_clone_from_id'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_parent_task_id'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_orderno'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_name'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_company_id'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_code'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_cmf_owner_id'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_cmf_modified_by_id'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_cmf_locked_by_id'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_cmf_created_at'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_cmf_author_id'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_cache_status_type'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_alarm_date'), table_name='cmf_bill')
    op.drop_index(op.f('ix_cmf_bill_activity_id'), table_name='cmf_bill')
    op.drop_table('cmf_bill')
    op.drop_index(op.f('ix_cmf_product_unit_id'), table_name='cmf_product')
    op.drop_index(op.f('ix_cmf_product_name'), table_name='cmf_product')
    op.drop_index(op.f('ix_cmf_product_code'), table_name='cmf_product')
    op.drop_index(op.f('ix_cmf_product_cmf_owner_id'), table_name='cmf_product')
    op.drop_index(op.f('ix_cmf_product_cmf_modified_by_id'), table_name='cmf_product')
    op.drop_index(op.f('ix_cmf_product_cmf_locked_by_id'), table_name='cmf_product')
    op.drop_index(op.f('ix_cmf_product_cmf_created_at'), table_name='cmf_product')
    op.drop_index(op.f('ix_cmf_product_cmf_author_id'), table_name='cmf_product')
    op.drop_table('cmf_product')
    op.drop_index(op.f('ix_cmf_unit_name'), table_name='cmf_unit')
    op.drop_index(op.f('ix_cmf_unit_code'), table_name='cmf_unit')
    op.drop_index(op.f('ix_cmf_unit_cmf_owner_id'), table_name='cmf_unit')
    op.drop_index(op.f('ix_cmf_unit_cmf_modified_by_id'), table_name='cmf_unit')
    op.drop_index(op.f('ix_cmf_unit_cmf_locked_by_id'), table_name='cmf_unit')
    op.drop_index(op.f('ix_cmf_unit_cmf_created_at'), table_name='cmf_unit')
    op.drop_index(op.f('ix_cmf_unit_cmf_author_id'), table_name='cmf_unit')
    op.drop_table('cmf_unit')
    op.drop_index(op.f('ix_cmf_subscription_name'), table_name='cmf_subscription')
    op.drop_index(op.f('ix_cmf_subscription_code'), table_name='cmf_subscription')
    op.drop_index(op.f('ix_cmf_subscription_cmf_owner_id'), table_name='cmf_subscription')
    op.drop_index(op.f('ix_cmf_subscription_cmf_modified_by_id'), table_name='cmf_subscription')
    op.drop_index(op.f('ix_cmf_subscription_cmf_locked_by_id'), table_name='cmf_subscription')
    op.drop_index(op.f('ix_cmf_subscription_cmf_created_at'), table_name='cmf_subscription')
    op.drop_index(op.f('ix_cmf_subscription_cmf_author_id'), table_name='cmf_subscription')
    op.drop_table('cmf_subscription')
    op.drop_index(op.f('ix_cmf_print_tmpl_name'), table_name='cmf_print_tmpl')
    op.drop_index(op.f('ix_cmf_print_tmpl_code'), table_name='cmf_print_tmpl')
    op.drop_index(op.f('ix_cmf_print_tmpl_cmf_owner_id'), table_name='cmf_print_tmpl')
    op.drop_index(op.f('ix_cmf_print_tmpl_cmf_modified_by_id'), table_name='cmf_print_tmpl')
    op.drop_index(op.f('ix_cmf_print_tmpl_cmf_locked_by_id'), table_name='cmf_print_tmpl')
    op.drop_index(op.f('ix_cmf_print_tmpl_cmf_created_at'), table_name='cmf_print_tmpl')
    op.drop_index(op.f('ix_cmf_print_tmpl_cmf_author_id'), table_name='cmf_print_tmpl')
    op.drop_table('cmf_print_tmpl')
    op.drop_index(op.f('ix_cmf_price_name'), table_name='cmf_price')
    op.drop_index(op.f('ix_cmf_price_code'), table_name='cmf_price')
    op.drop_index(op.f('ix_cmf_price_cmf_owner_id'), table_name='cmf_price')
    op.drop_index(op.f('ix_cmf_price_cmf_modified_by_id'), table_name='cmf_price')
    op.drop_index(op.f('ix_cmf_price_cmf_locked_by_id'), table_name='cmf_price')
    op.drop_index(op.f('ix_cmf_price_cmf_created_at'), table_name='cmf_price')
    op.drop_index(op.f('ix_cmf_price_cmf_author_id'), table_name='cmf_price')
    op.drop_table('cmf_price')
    op.drop_index(op.f('ix_cmf_lead_spectators_root_id'), table_name='cmf_lead_spectators')
    op.drop_index(op.f('ix_cmf_lead_spectators_right_id'), table_name='cmf_lead_spectators')
    op.drop_index(op.f('ix_cmf_lead_spectators_parent_id'), table_name='cmf_lead_spectators')
    op.drop_index(op.f('ix_cmf_lead_spectators_left_id'), table_name='cmf_lead_spectators')
    op.drop_table('cmf_lead_spectators')
    op.drop_index(op.f('ix_cmf_lead_related_objects_root_id'), table_name='cmf_lead_related_objects')
    op.drop_index(op.f('ix_cmf_lead_related_objects_right_id'), table_name='cmf_lead_related_objects')
    op.drop_index(op.f('ix_cmf_lead_related_objects_parent_id'), table_name='cmf_lead_related_objects')
    op.drop_index(op.f('ix_cmf_lead_related_objects_left_id'), table_name='cmf_lead_related_objects')
    op.drop_table('cmf_lead_related_objects')
    op.drop_index(op.f('ix_cmf_lead_executors_root_id'), table_name='cmf_lead_executors')
    op.drop_index(op.f('ix_cmf_lead_executors_right_id'), table_name='cmf_lead_executors')
    op.drop_index(op.f('ix_cmf_lead_executors_parent_id'), table_name='cmf_lead_executors')
    op.drop_index(op.f('ix_cmf_lead_executors_left_id'), table_name='cmf_lead_executors')
    op.drop_table('cmf_lead_executors')
    op.drop_index(op.f('ix_cmf_integration_name'), table_name='cmf_integration')
    op.drop_index(op.f('ix_cmf_integration_code'), table_name='cmf_integration')
    op.drop_index(op.f('ix_cmf_integration_cmf_owner_id'), table_name='cmf_integration')
    op.drop_index(op.f('ix_cmf_integration_cmf_modified_by_id'), table_name='cmf_integration')
    op.drop_index(op.f('ix_cmf_integration_cmf_locked_by_id'), table_name='cmf_integration')
    op.drop_index(op.f('ix_cmf_integration_cmf_created_at'), table_name='cmf_integration')
    op.drop_index(op.f('ix_cmf_integration_cmf_author_id'), table_name='cmf_integration')
    op.drop_table('cmf_integration')
    op.drop_index(op.f('ix_cmf_deal_spectators_root_id'), table_name='cmf_deal_spectators')
    op.drop_index(op.f('ix_cmf_deal_spectators_right_id'), table_name='cmf_deal_spectators')
    op.drop_index(op.f('ix_cmf_deal_spectators_parent_id'), table_name='cmf_deal_spectators')
    op.drop_index(op.f('ix_cmf_deal_spectators_left_id'), table_name='cmf_deal_spectators')
    op.drop_table('cmf_deal_spectators')
    op.drop_index(op.f('ix_cmf_deal_related_objects_root_id'), table_name='cmf_deal_related_objects')
    op.drop_index(op.f('ix_cmf_deal_related_objects_right_id'), table_name='cmf_deal_related_objects')
    op.drop_index(op.f('ix_cmf_deal_related_objects_parent_id'), table_name='cmf_deal_related_objects')
    op.drop_index(op.f('ix_cmf_deal_related_objects_left_id'), table_name='cmf_deal_related_objects')
    op.drop_table('cmf_deal_related_objects')
    op.drop_index(op.f('ix_cmf_deal_executors_root_id'), table_name='cmf_deal_executors')
    op.drop_index(op.f('ix_cmf_deal_executors_right_id'), table_name='cmf_deal_executors')
    op.drop_index(op.f('ix_cmf_deal_executors_parent_id'), table_name='cmf_deal_executors')
    op.drop_index(op.f('ix_cmf_deal_executors_left_id'), table_name='cmf_deal_executors')
    op.drop_table('cmf_deal_executors')
    op.drop_index(op.f('ix_cmf_currency_name'), table_name='cmf_currency')
    op.drop_index(op.f('ix_cmf_currency_code'), table_name='cmf_currency')
    op.drop_index(op.f('ix_cmf_currency_cmf_owner_id'), table_name='cmf_currency')
    op.drop_index(op.f('ix_cmf_currency_cmf_modified_by_id'), table_name='cmf_currency')
    op.drop_index(op.f('ix_cmf_currency_cmf_locked_by_id'), table_name='cmf_currency')
    op.drop_index(op.f('ix_cmf_currency_cmf_created_at'), table_name='cmf_currency')
    op.drop_index(op.f('ix_cmf_currency_cmf_author_id'), table_name='cmf_currency')
    op.drop_table('cmf_currency')
    op.drop_index(op.f('ix_cmf_bill_spectators_root_id'), table_name='cmf_bill_spectators')
    op.drop_index(op.f('ix_cmf_bill_spectators_right_id'), table_name='cmf_bill_spectators')
    op.drop_index(op.f('ix_cmf_bill_spectators_parent_id'), table_name='cmf_bill_spectators')
    op.drop_index(op.f('ix_cmf_bill_spectators_left_id'), table_name='cmf_bill_spectators')
    op.drop_table('cmf_bill_spectators')
    op.drop_index(op.f('ix_cmf_bill_related_objects_root_id'), table_name='cmf_bill_related_objects')
    op.drop_index(op.f('ix_cmf_bill_related_objects_right_id'), table_name='cmf_bill_related_objects')
    op.drop_index(op.f('ix_cmf_bill_related_objects_parent_id'), table_name='cmf_bill_related_objects')
    op.drop_index(op.f('ix_cmf_bill_related_objects_left_id'), table_name='cmf_bill_related_objects')
    op.drop_table('cmf_bill_related_objects')
    op.drop_index(op.f('ix_cmf_bill_executors_root_id'), table_name='cmf_bill_executors')
    op.drop_index(op.f('ix_cmf_bill_executors_right_id'), table_name='cmf_bill_executors')
    op.drop_index(op.f('ix_cmf_bill_executors_parent_id'), table_name='cmf_bill_executors')
    op.drop_index(op.f('ix_cmf_bill_executors_left_id'), table_name='cmf_bill_executors')
    op.drop_table('cmf_bill_executors')
    # ### end Alembic commands ###
