"""empty message

Revision ID: 66a3b835f9e1
Revises: 67c7d330ecca
Create Date: 2022-10-19 07:28:33.924476

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = '66a3b835f9e1'
down_revision = '67c7d330ecca'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('cmf_time_tracker',
    sa.Column('id', sa.String(length=64), nullable=False),
    sa.Column('cmf_locked_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_created_at', sa.TIMESTAMP(timezone=True), nullable=False),
    sa.Column('cmf_modified_at', sa.TIMESTAMP(timezone=True), nullable=False),
    sa.Column('cmf_viewed_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_deleted', sa.Boolean(), nullable=False),
    sa.Column('cmf_version', sa.BIGINT(), nullable=True),
    sa.Column('name', sa.String(length=256), nullable=True),
    sa.Column('code', sa.String(length=64), nullable=True),
    sa.Column('system', sa.Boolean(), nullable=False),
    sa.Column('text', sa.TEXT(), nullable=True),
    sa.Column('ext_id', sa.String(), nullable=True),
    sa.Column('is_favorite', sa.Boolean(), nullable=True),
    sa.Column('has_tree_nodes', sa.Boolean(), nullable=True),
    sa.Column('tree_node_is_branch', sa.Boolean(), nullable=True),
    sa.Column('tree_hidden', sa.Boolean(), nullable=True),
    sa.Column('orderno', sa.Integer(), nullable=True),
    sa.Column('perm_public', sa.Boolean(), nullable=True),
    sa.Column('perm_has_acl', sa.Boolean(), nullable=True),
    sa.Column('perm_inherit', sa.Boolean(), nullable=True),
    sa.Column('perm_parent_owner_id', sa.String(length=64), nullable=True),
    sa.Column('perm_inherit_acl_id', sa.String(length=64), nullable=True),
    sa.Column('perm_effective_acl_id', sa.String(length=64), nullable=True),
    sa.Column('perm_encrypt', sa.Boolean(), nullable=True),
    sa.Column('status', sa.String(length=32), nullable=False, server_default='open'),
    sa.Column('play_start_date', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_author_id', sa.String(length=64), nullable=True),
    sa.Column('cmf_owner_id', sa.String(length=64), nullable=True),
    sa.Column('cmf_owner_assistant_id', sa.String(length=64), nullable=True),
    sa.Column('parent_id', sa.String(length=64), nullable=True),
    sa.Column('cmf_modified_by_id', sa.String(length=64), nullable=True),
    sa.Column('cmf_locked_by_id', sa.String(length=64), nullable=True),
    sa.Column('cmf_import_id', sa.String(length=64), nullable=True),
    sa.Column('tree_parent_id', sa.String(length=64), nullable=True),
    sa.Column('perm_acl_id', sa.String(length=64), nullable=True),
    sa.Column('perm_parent_id', sa.String(length=64), nullable=True),
    sa.Column('task_id', sa.String(length=64), nullable=True),
    sa.ForeignKeyConstraint(['cmf_import_id'], ['cmf_import.id'], ),
    sa.ForeignKeyConstraint(['parent_id'], ['cmf_person.id'], ),
    sa.ForeignKeyConstraint(['perm_acl_id'], ['cmf_access_list.id'], ),
    sa.ForeignKeyConstraint(['task_id'], ['cmf_task.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_time_tracker_cmf_author_id'), 'cmf_time_tracker', ['cmf_author_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_cmf_created_at'), 'cmf_time_tracker', ['cmf_created_at'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_cmf_deleted'), 'cmf_time_tracker', ['cmf_deleted'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_cmf_import_id'), 'cmf_time_tracker', ['cmf_import_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_cmf_locked_at'), 'cmf_time_tracker', ['cmf_locked_at'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_cmf_locked_by_id'), 'cmf_time_tracker', ['cmf_locked_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_cmf_modified_at'), 'cmf_time_tracker', ['cmf_modified_at'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_cmf_modified_by_id'), 'cmf_time_tracker', ['cmf_modified_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_cmf_owner_assistant_id'), 'cmf_time_tracker', ['cmf_owner_assistant_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_cmf_owner_id'), 'cmf_time_tracker', ['cmf_owner_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_cmf_version'), 'cmf_time_tracker', ['cmf_version'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_cmf_viewed_at'), 'cmf_time_tracker', ['cmf_viewed_at'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_code'), 'cmf_time_tracker', ['code'], unique=True)
    op.create_index(op.f('ix_cmf_time_tracker_name'), 'cmf_time_tracker', ['name'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_orderno'), 'cmf_time_tracker', ['orderno'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_parent_id'), 'cmf_time_tracker', ['parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_perm_acl_id'), 'cmf_time_tracker', ['perm_acl_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_perm_parent_id'), 'cmf_time_tracker', ['perm_parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_task_id'), 'cmf_time_tracker', ['task_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_tree_parent_id'), 'cmf_time_tracker', ['tree_parent_id'], unique=False)
    op.create_table('cmf_time_tracker_history',
    sa.Column('id', sa.String(length=64), nullable=False),
    sa.Column('cmf_locked_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_created_at', sa.TIMESTAMP(timezone=True), nullable=False),
    sa.Column('cmf_modified_at', sa.TIMESTAMP(timezone=True), nullable=False),
    sa.Column('cmf_viewed_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_deleted', sa.Boolean(), nullable=False),
    sa.Column('cmf_version', sa.BIGINT(), nullable=True),
    sa.Column('name', sa.String(length=256), nullable=True),
    sa.Column('code', sa.String(length=64), nullable=True),
    sa.Column('system', sa.Boolean(), nullable=False),
    sa.Column('text', sa.TEXT(), nullable=True),
    sa.Column('ext_id', sa.String(), nullable=True),
    sa.Column('is_favorite', sa.Boolean(), nullable=True),
    sa.Column('has_tree_nodes', sa.Boolean(), nullable=True),
    sa.Column('tree_node_is_branch', sa.Boolean(), nullable=True),
    sa.Column('tree_hidden', sa.Boolean(), nullable=True),
    sa.Column('orderno', sa.Integer(), nullable=True),
    sa.Column('perm_public', sa.Boolean(), nullable=True),
    sa.Column('perm_has_acl', sa.Boolean(), nullable=True),
    sa.Column('perm_inherit', sa.Boolean(), nullable=True),
    sa.Column('perm_parent_owner_id', sa.String(length=64), nullable=True),
    sa.Column('perm_inherit_acl_id', sa.String(length=64), nullable=True),
    sa.Column('perm_effective_acl_id', sa.String(length=64), nullable=True),
    sa.Column('perm_encrypt', sa.Boolean(), nullable=True),
    sa.Column('start_date', sa.TIMESTAMP(timezone=True), nullable=False),
    sa.Column('end_date', sa.TIMESTAMP(timezone=True), nullable=False),
    sa.Column('time_spent', sa.Integer(), nullable=False),
    sa.Column('status', sa.String(length=32), nullable=False),
    sa.Column('cmf_author_id', sa.String(length=64), nullable=True),
    sa.Column('cmf_owner_id', sa.String(length=64), nullable=True),
    sa.Column('cmf_owner_assistant_id', sa.String(length=64), nullable=True),
    sa.Column('parent_id', sa.String(length=64), nullable=False),
    sa.Column('cmf_modified_by_id', sa.String(length=64), nullable=True),
    sa.Column('cmf_locked_by_id', sa.String(length=64), nullable=True),
    sa.Column('cmf_import_id', sa.String(length=64), nullable=True),
    sa.Column('tree_parent_id', sa.String(length=64), nullable=True),
    sa.Column('perm_acl_id', sa.String(length=64), nullable=True),
    sa.Column('perm_parent_id', sa.String(length=64), nullable=True),
    sa.ForeignKeyConstraint(['cmf_import_id'], ['cmf_import.id'], ),
    sa.ForeignKeyConstraint(['parent_id'], ['cmf_task.id'], ),
    sa.ForeignKeyConstraint(['perm_acl_id'], ['cmf_access_list.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_time_tracker_history_cmf_author_id'), 'cmf_time_tracker_history', ['cmf_author_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_cmf_created_at'), 'cmf_time_tracker_history', ['cmf_created_at'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_cmf_deleted'), 'cmf_time_tracker_history', ['cmf_deleted'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_cmf_import_id'), 'cmf_time_tracker_history', ['cmf_import_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_cmf_locked_at'), 'cmf_time_tracker_history', ['cmf_locked_at'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_cmf_locked_by_id'), 'cmf_time_tracker_history', ['cmf_locked_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_cmf_modified_at'), 'cmf_time_tracker_history', ['cmf_modified_at'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_cmf_modified_by_id'), 'cmf_time_tracker_history', ['cmf_modified_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_cmf_owner_assistant_id'), 'cmf_time_tracker_history', ['cmf_owner_assistant_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_cmf_owner_id'), 'cmf_time_tracker_history', ['cmf_owner_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_cmf_version'), 'cmf_time_tracker_history', ['cmf_version'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_cmf_viewed_at'), 'cmf_time_tracker_history', ['cmf_viewed_at'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_code'), 'cmf_time_tracker_history', ['code'], unique=True)
    op.create_index(op.f('ix_cmf_time_tracker_history_end_date'), 'cmf_time_tracker_history', ['end_date'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_name'), 'cmf_time_tracker_history', ['name'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_orderno'), 'cmf_time_tracker_history', ['orderno'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_parent_id'), 'cmf_time_tracker_history', ['parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_perm_acl_id'), 'cmf_time_tracker_history', ['perm_acl_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_perm_parent_id'), 'cmf_time_tracker_history', ['perm_parent_id'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_start_date'), 'cmf_time_tracker_history', ['start_date'], unique=False)
    op.create_index(op.f('ix_cmf_time_tracker_history_tree_parent_id'), 'cmf_time_tracker_history', ['tree_parent_id'], unique=False)
    op.drop_index('ix_cmf_task_time_history_cmf_author_id', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_cmf_created_at', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_cmf_deleted', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_cmf_import_id', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_cmf_locked_at', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_cmf_locked_by_id', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_cmf_modified_at', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_cmf_modified_by_id', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_cmf_owner_assistant_id', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_cmf_owner_id', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_cmf_version', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_cmf_viewed_at', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_code', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_end_date', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_name', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_orderno', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_parent_id', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_perm_acl_id', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_perm_parent_id', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_start_date', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_task_id', table_name='cmf_task_time_history')
    op.drop_index('ix_cmf_task_time_history_tree_parent_id', table_name='cmf_task_time_history')
    op.drop_table('cmf_task_time_history')
    op.add_column('cmf_task', sa.Column('timetracker_cache_status', sa.String(length=32), nullable=False, server_default='open'))
    op.add_column('cmf_task', sa.Column('time_spent', sa.Integer(), nullable=False, server_default='0'))
    op.drop_column('cmf_task', 'cmf_task_play')
    op.drop_column('cmf_task', 'spent_time')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('cmf_task', sa.Column('spent_time', sa.INTEGER(), server_default=sa.text('0'), autoincrement=False, nullable=False))
    op.add_column('cmf_task', sa.Column('cmf_task_play', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.drop_column('cmf_task', 'time_spent')
    op.drop_column('cmf_task', 'timetracker_cache_status')
    op.create_table('cmf_task_time_history',
    sa.Column('id', sa.VARCHAR(length=64), autoincrement=False, nullable=False),
    sa.Column('cmf_locked_at', postgresql.TIMESTAMP(timezone=True), autoincrement=False, nullable=True),
    sa.Column('cmf_created_at', postgresql.TIMESTAMP(timezone=True), autoincrement=False, nullable=False),
    sa.Column('cmf_modified_at', postgresql.TIMESTAMP(timezone=True), autoincrement=False, nullable=False),
    sa.Column('cmf_viewed_at', postgresql.TIMESTAMP(timezone=True), autoincrement=False, nullable=True),
    sa.Column('cmf_deleted', sa.BOOLEAN(), autoincrement=False, nullable=False),
    sa.Column('cmf_version', sa.BIGINT(), autoincrement=False, nullable=True),
    sa.Column('name', sa.VARCHAR(length=256), autoincrement=False, nullable=True),
    sa.Column('code', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('system', sa.BOOLEAN(), autoincrement=False, nullable=False),
    sa.Column('text', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('is_favorite', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.Column('has_tree_nodes', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.Column('tree_node_is_branch', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.Column('tree_hidden', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.Column('orderno', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('perm_public', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.Column('perm_has_acl', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.Column('perm_inherit', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.Column('perm_parent_owner_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('perm_inherit_acl_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('perm_effective_acl_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('perm_encrypt', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.Column('start_date', postgresql.TIMESTAMP(timezone=True), autoincrement=False, nullable=True),
    sa.Column('end_date', postgresql.TIMESTAMP(timezone=True), autoincrement=False, nullable=True),
    sa.Column('cmf_author_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('cmf_owner_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('cmf_owner_assistant_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('parent_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('cmf_modified_by_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('cmf_locked_by_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('cmf_import_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('tree_parent_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('perm_acl_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('perm_parent_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('task_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('estimate', sa.INTEGER(), server_default=sa.text('0'), autoincrement=False, nullable=False),
    sa.Column('ext_id', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['cmf_import_id'], ['cmf_import.id'], name='cmf_task_time_history_cmf_import_id_fkey'),
    sa.ForeignKeyConstraint(['perm_acl_id'], ['cmf_access_list.id'], name='cmf_task_time_history_perm_acl_id_fkey'),
    sa.ForeignKeyConstraint(['task_id'], ['cmf_task.id'], name='cmf_task_time_history_task_id_fkey'),
    sa.PrimaryKeyConstraint('id', name='cmf_task_time_history_pkey')
    )
    op.create_index('ix_cmf_task_time_history_tree_parent_id', 'cmf_task_time_history', ['tree_parent_id'], unique=False)
    op.create_index('ix_cmf_task_time_history_task_id', 'cmf_task_time_history', ['task_id'], unique=False)
    op.create_index('ix_cmf_task_time_history_start_date', 'cmf_task_time_history', ['start_date'], unique=False)
    op.create_index('ix_cmf_task_time_history_perm_parent_id', 'cmf_task_time_history', ['perm_parent_id'], unique=False)
    op.create_index('ix_cmf_task_time_history_perm_acl_id', 'cmf_task_time_history', ['perm_acl_id'], unique=False)
    op.create_index('ix_cmf_task_time_history_parent_id', 'cmf_task_time_history', ['parent_id'], unique=False)
    op.create_index('ix_cmf_task_time_history_orderno', 'cmf_task_time_history', ['orderno'], unique=False)
    op.create_index('ix_cmf_task_time_history_name', 'cmf_task_time_history', ['name'], unique=False)
    op.create_index('ix_cmf_task_time_history_end_date', 'cmf_task_time_history', ['end_date'], unique=False)
    op.create_index('ix_cmf_task_time_history_code', 'cmf_task_time_history', ['code'], unique=False)
    op.create_index('ix_cmf_task_time_history_cmf_viewed_at', 'cmf_task_time_history', ['cmf_viewed_at'], unique=False)
    op.create_index('ix_cmf_task_time_history_cmf_version', 'cmf_task_time_history', ['cmf_version'], unique=False)
    op.create_index('ix_cmf_task_time_history_cmf_owner_id', 'cmf_task_time_history', ['cmf_owner_id'], unique=False)
    op.create_index('ix_cmf_task_time_history_cmf_owner_assistant_id', 'cmf_task_time_history', ['cmf_owner_assistant_id'], unique=False)
    op.create_index('ix_cmf_task_time_history_cmf_modified_by_id', 'cmf_task_time_history', ['cmf_modified_by_id'], unique=False)
    op.create_index('ix_cmf_task_time_history_cmf_modified_at', 'cmf_task_time_history', ['cmf_modified_at'], unique=False)
    op.create_index('ix_cmf_task_time_history_cmf_locked_by_id', 'cmf_task_time_history', ['cmf_locked_by_id'], unique=False)
    op.create_index('ix_cmf_task_time_history_cmf_locked_at', 'cmf_task_time_history', ['cmf_locked_at'], unique=False)
    op.create_index('ix_cmf_task_time_history_cmf_import_id', 'cmf_task_time_history', ['cmf_import_id'], unique=False)
    op.create_index('ix_cmf_task_time_history_cmf_deleted', 'cmf_task_time_history', ['cmf_deleted'], unique=False)
    op.create_index('ix_cmf_task_time_history_cmf_created_at', 'cmf_task_time_history', ['cmf_created_at'], unique=False)
    op.create_index('ix_cmf_task_time_history_cmf_author_id', 'cmf_task_time_history', ['cmf_author_id'], unique=False)
    op.drop_index(op.f('ix_cmf_time_tracker_history_tree_parent_id'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_start_date'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_perm_parent_id'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_perm_acl_id'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_parent_id'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_orderno'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_name'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_end_date'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_code'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_cmf_viewed_at'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_cmf_version'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_cmf_owner_id'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_cmf_owner_assistant_id'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_cmf_modified_by_id'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_cmf_modified_at'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_cmf_locked_by_id'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_cmf_locked_at'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_cmf_import_id'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_cmf_deleted'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_cmf_created_at'), table_name='cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_history_cmf_author_id'), table_name='cmf_time_tracker_history')
    op.drop_table('cmf_time_tracker_history')
    op.drop_index(op.f('ix_cmf_time_tracker_tree_parent_id'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_task_id'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_perm_parent_id'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_perm_acl_id'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_parent_id'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_orderno'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_name'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_code'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_cmf_viewed_at'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_cmf_version'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_cmf_owner_id'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_cmf_owner_assistant_id'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_cmf_modified_by_id'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_cmf_modified_at'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_cmf_locked_by_id'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_cmf_locked_at'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_cmf_import_id'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_cmf_deleted'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_cmf_created_at'), table_name='cmf_time_tracker')
    op.drop_index(op.f('ix_cmf_time_tracker_cmf_author_id'), table_name='cmf_time_tracker')
    op.drop_table('cmf_time_tracker')
    # ### end Alembic commands ###
