"""evatest

Revision ID: 8b96929e4d62
Revises: e8ca502e7c08
Create Date: 2024-11-21 09:37:58.904604

"""

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

# revision identifiers, used by Alembic.
revision = "8b96929e4d62"
down_revision = "e8ca502e7c08"
branch_labels = None
depends_on = None


def upgrade():
    op.create_table(
        "cmf_testcase_folder",
        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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), nullable=True),
        sa.Column("is_public", sa.Boolean(), nullable=False),
        sa.Column("is_public_editable", sa.Boolean(), nullable=False),
        sa.Column("is_public_comments", sa.Boolean(), nullable=False),
        sa.Column("has_children_archived", sa.Boolean(), nullable=False),
        sa.Column("logic_prefix", sa.String(), nullable=True),
        sa.Column("ui_view_form", sa.String(length=32), nullable=False),
        sa.Column("parent_logic_prefix", sa.String(), nullable=True),
        sa.Column("ui_view_form_options", sa.TEXT(), nullable=False),
        sa.Column(
            "status_modified_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column(
            "status_in_progress_start",
            sa.TIMESTAMP(timezone=True),
            nullable=True,
        ),
        sa.Column(
            "status_in_progress_end",
            sa.TIMESTAMP(timezone=True),
            nullable=True,
        ),
        sa.Column(
            "status_review_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column(
            "status_closed_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("no_control", sa.Boolean(), nullable=False),
        sa.Column("priority", sa.Integer(), nullable=False),
        sa.Column("mark", sa.String(length=32), nullable=True),
        sa.Column(
            "user_rating", sa.Numeric(precision=14, scale=2), nullable=True
        ),
        sa.Column("user_rating_count", sa.Integer(), nullable=False),
        sa.Column("alarm_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column("deadline", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column(
            "plan_start_date", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("plan_end_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column(
            "period_next_date", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("period_interval", sa.String(length=32), nullable=True),
        sa.Column("is_template", sa.Boolean(), nullable=False),
        sa.Column("is_penalty", sa.Boolean(), nullable=False),
        sa.Column("cache_status_type", sa.String(length=32), nullable=True),
        sa.Column("cache_fields", sa.TEXT(), nullable=True),
        sa.Column("approved", sa.Boolean(), nullable=False),
        sa.Column("perm_policy", sa.String(length=32), nullable=False),
        sa.Column("perm_policy_guest", sa.String(length=32), nullable=False),
        sa.Column(
            "perm_policy_anonymous", sa.String(length=32), nullable=False
        ),
        sa.Column(
            "perm_policy_sharelink", sa.String(length=32), nullable=False
        ),
        sa.Column("sharelink_hash", sa.String(length=32), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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("workflow_id", sa.String(length=64), nullable=True),
        sa.Column(
            "default_task_workflow_id", sa.String(length=64), nullable=True
        ),
        sa.Column("logic_type_id", sa.String(length=64), nullable=True),
        sa.Column("scheme_wf_id", sa.String(length=64), nullable=True),
        sa.Column(
            "cmf_owner_assistant_id", sa.String(length=64), nullable=True
        ),
        sa.Column(
            "perm_security_level_id", sa.String(length=64), nullable=True
        ),
        sa.Column("resolution_id", sa.String(length=64), nullable=True),
        sa.Column("status_id", sa.String(length=64), nullable=True),
        sa.Column("company_id", sa.String(length=64), nullable=True),
        sa.Column("responsible_id", sa.String(length=64), nullable=True),
        sa.Column("waiting_for_id", sa.String(length=64), nullable=True),
        sa.Column("cloned_from_id", sa.String(length=64), nullable=True),
        sa.Column("activity_id", sa.String(length=64), nullable=True),
        sa.Column("cache_status_opt_id", sa.String(length=64), nullable=True),
        sa.ForeignKeyConstraint(
            ["activity_id"],
            ["cmf_activity.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cache_status_opt_id"],
            ["cmf_status_opt.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cmf_import_id"],
            ["cmf_import.id"],
        ),
        sa.ForeignKeyConstraint(
            ["company_id"],
            ["cmf_company.id"],
        ),
        sa.ForeignKeyConstraint(
            ["default_task_workflow_id"],
            ["cmf_workflow.id"],
        ),
        sa.ForeignKeyConstraint(
            ["logic_type_id"],
            ["cmf_logic_type.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_security_level_id"],
            ["cmf_security_level.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.ForeignKeyConstraint(
            ["resolution_id"],
            ["cmf_resolution.id"],
        ),
        sa.ForeignKeyConstraint(
            ["scheme_wf_id"],
            ["cmf_scheme_wf.id"],
        ),
        sa.ForeignKeyConstraint(
            ["status_id"],
            ["cmf_status.id"],
        ),
        sa.ForeignKeyConstraint(
            ["workflow_id"],
            ["cmf_workflow.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )

    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "cmf_test_configuration",
        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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), nullable=True),
        sa.Column("variables", sa.TEXT(), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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_project.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_cmf_author_id"),
        "cmf_test_configuration",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_cmf_created_at"),
        "cmf_test_configuration",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_cmf_deleted"),
        "cmf_test_configuration",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_cmf_import_id"),
        "cmf_test_configuration",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_cmf_locked_at"),
        "cmf_test_configuration",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_cmf_locked_by_id"),
        "cmf_test_configuration",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_cmf_modified_at"),
        "cmf_test_configuration",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_cmf_modified_by_id"),
        "cmf_test_configuration",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_cmf_owner_id"),
        "cmf_test_configuration",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_cmf_version"),
        "cmf_test_configuration",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_cmf_viewed_at"),
        "cmf_test_configuration",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_code"),
        "cmf_test_configuration",
        ["code"],
        unique=True,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_name"),
        "cmf_test_configuration",
        ["name"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_orderno"),
        "cmf_test_configuration",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_parent_id"),
        "cmf_test_configuration",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_perm_acl_id"),
        "cmf_test_configuration",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_perm_parent_id"),
        "cmf_test_configuration",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_project_id"),
        "cmf_test_configuration",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_root_parent_id"),
        "cmf_test_configuration",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_configuration_tree_parent_id"),
        "cmf_test_configuration",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_table(
        "cmf_test_environment",
        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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), nullable=True),
        sa.Column("slug", sa.String(), nullable=True),
        sa.Column("host", sa.String(length=4096), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_test_environment_cmf_author_id"),
        "cmf_test_environment",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_cmf_created_at"),
        "cmf_test_environment",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_cmf_deleted"),
        "cmf_test_environment",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_cmf_import_id"),
        "cmf_test_environment",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_cmf_locked_at"),
        "cmf_test_environment",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_cmf_locked_by_id"),
        "cmf_test_environment",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_cmf_modified_at"),
        "cmf_test_environment",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_cmf_modified_by_id"),
        "cmf_test_environment",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_cmf_owner_id"),
        "cmf_test_environment",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_cmf_version"),
        "cmf_test_environment",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_cmf_viewed_at"),
        "cmf_test_environment",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_code"),
        "cmf_test_environment",
        ["code"],
        unique=True,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_name"),
        "cmf_test_environment",
        ["name"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_orderno"),
        "cmf_test_environment",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_parent_id"),
        "cmf_test_environment",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_perm_acl_id"),
        "cmf_test_environment",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_perm_parent_id"),
        "cmf_test_environment",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_project_id"),
        "cmf_test_environment",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_root_parent_id"),
        "cmf_test_environment",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_environment_tree_parent_id"),
        "cmf_test_environment",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_table(
        "cmf_test_param",
        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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_test_param_cmf_author_id"),
        "cmf_test_param",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_cmf_created_at"),
        "cmf_test_param",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_cmf_deleted"),
        "cmf_test_param",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_cmf_import_id"),
        "cmf_test_param",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_cmf_locked_at"),
        "cmf_test_param",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_cmf_locked_by_id"),
        "cmf_test_param",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_cmf_modified_at"),
        "cmf_test_param",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_cmf_modified_by_id"),
        "cmf_test_param",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_cmf_owner_id"),
        "cmf_test_param",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_cmf_version"),
        "cmf_test_param",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_cmf_viewed_at"),
        "cmf_test_param",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_code"), "cmf_test_param", ["code"], unique=True
    )
    op.create_index(
        op.f("ix_cmf_test_param_name"),
        "cmf_test_param",
        ["name"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_orderno"),
        "cmf_test_param",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_parent_id"),
        "cmf_test_param",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_perm_acl_id"),
        "cmf_test_param",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_perm_parent_id"),
        "cmf_test_param",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_project_id"),
        "cmf_test_param",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_root_parent_id"),
        "cmf_test_param",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_tree_parent_id"),
        "cmf_test_param",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_table(
        "cmf_test_param_value",
        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(), 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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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_test_param.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_cmf_author_id"),
        "cmf_test_param_value",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_cmf_created_at"),
        "cmf_test_param_value",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_cmf_deleted"),
        "cmf_test_param_value",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_cmf_import_id"),
        "cmf_test_param_value",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_cmf_locked_at"),
        "cmf_test_param_value",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_cmf_locked_by_id"),
        "cmf_test_param_value",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_cmf_modified_at"),
        "cmf_test_param_value",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_cmf_modified_by_id"),
        "cmf_test_param_value",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_cmf_owner_id"),
        "cmf_test_param_value",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_cmf_version"),
        "cmf_test_param_value",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_cmf_viewed_at"),
        "cmf_test_param_value",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_code"),
        "cmf_test_param_value",
        ["code"],
        unique=True,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_orderno"),
        "cmf_test_param_value",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_parent_id"),
        "cmf_test_param_value",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_perm_acl_id"),
        "cmf_test_param_value",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_perm_parent_id"),
        "cmf_test_param_value",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_project_id"),
        "cmf_test_param_value",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_root_parent_id"),
        "cmf_test_param_value",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_test_param_value_tree_parent_id"),
        "cmf_test_param_value",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcase",
        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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), nullable=True),
        sa.Column("is_public", sa.Boolean(), nullable=False),
        sa.Column("is_public_editable", sa.Boolean(), nullable=False),
        sa.Column("is_public_comments", sa.Boolean(), nullable=False),
        sa.Column("has_children_archived", sa.Boolean(), nullable=False),
        sa.Column("logic_prefix", sa.String(), nullable=True),
        sa.Column("ui_view_form", sa.String(length=32), nullable=False),
        sa.Column("parent_logic_prefix", sa.String(), nullable=True),
        sa.Column("ui_view_form_options", sa.TEXT(), nullable=False),
        sa.Column(
            "status_modified_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column(
            "status_in_progress_start",
            sa.TIMESTAMP(timezone=True),
            nullable=True,
        ),
        sa.Column(
            "status_in_progress_end",
            sa.TIMESTAMP(timezone=True),
            nullable=True,
        ),
        sa.Column(
            "status_review_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column(
            "status_closed_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("no_control", sa.Boolean(), nullable=False),
        sa.Column("priority", sa.Integer(), nullable=False),
        sa.Column("mark", sa.String(length=32), nullable=True),
        sa.Column(
            "user_rating", sa.Numeric(precision=14, scale=2), nullable=True
        ),
        sa.Column("user_rating_count", sa.Integer(), nullable=False),
        sa.Column("alarm_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column("deadline", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column(
            "plan_start_date", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("plan_end_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column(
            "period_next_date", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("period_interval", sa.String(length=32), nullable=True),
        sa.Column("is_template", sa.Boolean(), nullable=False),
        sa.Column("is_penalty", sa.Boolean(), nullable=False),
        sa.Column("cache_status_type", sa.String(length=32), nullable=True),
        sa.Column("cache_fields", sa.TEXT(), nullable=True),
        sa.Column("approved", sa.Boolean(), nullable=False),
        sa.Column("perm_policy", sa.String(length=32), nullable=False),
        sa.Column("perm_policy_guest", sa.String(length=32), nullable=False),
        sa.Column(
            "perm_policy_anonymous", sa.String(length=32), nullable=False
        ),
        sa.Column(
            "perm_policy_sharelink", sa.String(length=32), nullable=False
        ),
        sa.Column("sharelink_hash", sa.String(length=32), nullable=True),
        sa.Column("cmf_ver_number", sa.Integer(), nullable=True),
        sa.Column("cmf_ver_cur", sa.Boolean(), nullable=False),
        sa.Column("significance", sa.Integer(), nullable=True),
        sa.Column("behavior", sa.String(length=32), nullable=True),
        sa.Column("automation_status", sa.String(length=32), nullable=True),
        sa.Column("disabled", sa.Boolean(), nullable=False),
        sa.Column("type", sa.String(length=32), nullable=True),
        sa.Column("layer", sa.String(length=32), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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("workflow_id", sa.String(length=64), nullable=True),
        sa.Column(
            "default_task_workflow_id", sa.String(length=64), nullable=True
        ),
        sa.Column("logic_type_id", sa.String(length=64), nullable=True),
        sa.Column("scheme_wf_id", sa.String(length=64), nullable=True),
        sa.Column(
            "cmf_owner_assistant_id", sa.String(length=64), nullable=True
        ),
        sa.Column(
            "perm_security_level_id", sa.String(length=64), nullable=True
        ),
        sa.Column("resolution_id", sa.String(length=64), nullable=True),
        sa.Column("status_id", sa.String(length=64), nullable=True),
        sa.Column("company_id", sa.String(length=64), nullable=True),
        sa.Column("responsible_id", sa.String(length=64), nullable=True),
        sa.Column("waiting_for_id", sa.String(length=64), nullable=True),
        sa.Column("cloned_from_id", sa.String(length=64), nullable=True),
        sa.Column("activity_id", sa.String(length=64), nullable=True),
        sa.Column("cache_status_opt_id", sa.String(length=64), nullable=True),
        sa.Column("cmf_ver_head_id", sa.String(length=64), nullable=True),
        sa.Column("cmf_ver_head2cur_id", sa.String(length=64), nullable=True),
        sa.Column("folder_id", sa.String(length=64), nullable=True),
        sa.ForeignKeyConstraint(
            ["activity_id"],
            ["cmf_activity.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cache_status_opt_id"],
            ["cmf_status_opt.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cmf_import_id"],
            ["cmf_import.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cmf_ver_head2cur_id"],
            ["cmf_testcase.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cmf_ver_head_id"],
            ["cmf_testcase.id"],
        ),
        sa.ForeignKeyConstraint(
            ["company_id"],
            ["cmf_company.id"],
        ),
        sa.ForeignKeyConstraint(
            ["default_task_workflow_id"],
            ["cmf_workflow.id"],
        ),
        sa.ForeignKeyConstraint(
            ["folder_id"],
            ["cmf_testcase_folder.id"],
        ),
        sa.ForeignKeyConstraint(
            ["logic_type_id"],
            ["cmf_logic_type.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_security_level_id"],
            ["cmf_security_level.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.ForeignKeyConstraint(
            ["resolution_id"],
            ["cmf_resolution.id"],
        ),
        sa.ForeignKeyConstraint(
            ["scheme_wf_id"],
            ["cmf_scheme_wf.id"],
        ),
        sa.ForeignKeyConstraint(
            ["status_id"],
            ["cmf_status.id"],
        ),
        sa.ForeignKeyConstraint(
            ["workflow_id"],
            ["cmf_workflow.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_activity_id"),
        "cmf_testcase",
        ["activity_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_alarm_date"),
        "cmf_testcase",
        ["alarm_date"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_approved"),
        "cmf_testcase",
        ["approved"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cache_status_opt_id"),
        "cmf_testcase",
        ["cache_status_opt_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cache_status_type"),
        "cmf_testcase",
        ["cache_status_type"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cloned_from_id"),
        "cmf_testcase",
        ["cloned_from_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_author_id"),
        "cmf_testcase",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_created_at"),
        "cmf_testcase",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_deleted"),
        "cmf_testcase",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_import_id"),
        "cmf_testcase",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_locked_at"),
        "cmf_testcase",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_locked_by_id"),
        "cmf_testcase",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_modified_at"),
        "cmf_testcase",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_modified_by_id"),
        "cmf_testcase",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_owner_assistant_id"),
        "cmf_testcase",
        ["cmf_owner_assistant_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_owner_id"),
        "cmf_testcase",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_ver_head2cur_id"),
        "cmf_testcase",
        ["cmf_ver_head2cur_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_ver_head_id"),
        "cmf_testcase",
        ["cmf_ver_head_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_version"),
        "cmf_testcase",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_viewed_at"),
        "cmf_testcase",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_code"), "cmf_testcase", ["code"], unique=True
    )
    op.create_index(
        op.f("ix_cmf_testcase_company_id"),
        "cmf_testcase",
        ["company_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_deadline"),
        "cmf_testcase",
        ["deadline"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_default_task_workflow_id"),
        "cmf_testcase",
        ["default_task_workflow_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_id"),
        "cmf_testcase",
        ["folder_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_is_template"),
        "cmf_testcase",
        ["is_template"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_logic_prefix"),
        "cmf_testcase",
        ["logic_prefix"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_logic_type_id"),
        "cmf_testcase",
        ["logic_type_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_name"), "cmf_testcase", ["name"], unique=False
    )
    op.create_index(
        op.f("ix_cmf_testcase_orderno"),
        "cmf_testcase",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_parent_id"),
        "cmf_testcase",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_parent_logic_prefix"),
        "cmf_testcase",
        ["parent_logic_prefix"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_perm_acl_id"),
        "cmf_testcase",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_perm_parent_id"),
        "cmf_testcase",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_perm_security_level_id"),
        "cmf_testcase",
        ["perm_security_level_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_project_id"),
        "cmf_testcase",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_resolution_id"),
        "cmf_testcase",
        ["resolution_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_responsible_id"),
        "cmf_testcase",
        ["responsible_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_root_parent_id"),
        "cmf_testcase",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_scheme_wf_id"),
        "cmf_testcase",
        ["scheme_wf_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_status_id"),
        "cmf_testcase",
        ["status_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_tree_parent_id"),
        "cmf_testcase",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_waiting_for_id"),
        "cmf_testcase",
        ["waiting_for_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_workflow_id"),
        "cmf_testcase",
        ["workflow_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcase_cmf_component",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.ForeignKeyConstraint(
            ["left_id"],
            ["cmf_testcase.id"],
        ),
        sa.ForeignKeyConstraint(
            ["right_id"],
            ["cmf_component.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_component_left_id"),
        "cmf_testcase_cmf_component",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_component_parent_id"),
        "cmf_testcase_cmf_component",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_component_right_id"),
        "cmf_testcase_cmf_component",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_component_root_id"),
        "cmf_testcase_cmf_component",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcase_cmf_owner_assistants",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_owner_assistants_left_id"),
        "cmf_testcase_cmf_owner_assistants",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_owner_assistants_parent_id"),
        "cmf_testcase_cmf_owner_assistants",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_owner_assistants_right_id"),
        "cmf_testcase_cmf_owner_assistants",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_cmf_owner_assistants_root_id"),
        "cmf_testcase_cmf_owner_assistants",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcase_executors",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_executors_left_id"),
        "cmf_testcase_executors",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_executors_parent_id"),
        "cmf_testcase_executors",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_executors_right_id"),
        "cmf_testcase_executors",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_executors_root_id"),
        "cmf_testcase_executors",
        ["root_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_activity_id"),
        "cmf_testcase_folder",
        ["activity_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_alarm_date"),
        "cmf_testcase_folder",
        ["alarm_date"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_approved"),
        "cmf_testcase_folder",
        ["approved"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cache_status_opt_id"),
        "cmf_testcase_folder",
        ["cache_status_opt_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cache_status_type"),
        "cmf_testcase_folder",
        ["cache_status_type"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cloned_from_id"),
        "cmf_testcase_folder",
        ["cloned_from_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cmf_author_id"),
        "cmf_testcase_folder",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cmf_created_at"),
        "cmf_testcase_folder",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cmf_deleted"),
        "cmf_testcase_folder",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cmf_import_id"),
        "cmf_testcase_folder",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cmf_locked_at"),
        "cmf_testcase_folder",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cmf_locked_by_id"),
        "cmf_testcase_folder",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cmf_modified_at"),
        "cmf_testcase_folder",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cmf_modified_by_id"),
        "cmf_testcase_folder",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cmf_owner_assistant_id"),
        "cmf_testcase_folder",
        ["cmf_owner_assistant_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cmf_owner_id"),
        "cmf_testcase_folder",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cmf_version"),
        "cmf_testcase_folder",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cmf_viewed_at"),
        "cmf_testcase_folder",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_code"),
        "cmf_testcase_folder",
        ["code"],
        unique=True,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_company_id"),
        "cmf_testcase_folder",
        ["company_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_deadline"),
        "cmf_testcase_folder",
        ["deadline"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_default_task_workflow_id"),
        "cmf_testcase_folder",
        ["default_task_workflow_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_is_template"),
        "cmf_testcase_folder",
        ["is_template"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_logic_prefix"),
        "cmf_testcase_folder",
        ["logic_prefix"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_logic_type_id"),
        "cmf_testcase_folder",
        ["logic_type_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_name"),
        "cmf_testcase_folder",
        ["name"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_orderno"),
        "cmf_testcase_folder",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_parent_id"),
        "cmf_testcase_folder",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_parent_logic_prefix"),
        "cmf_testcase_folder",
        ["parent_logic_prefix"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_perm_acl_id"),
        "cmf_testcase_folder",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_perm_parent_id"),
        "cmf_testcase_folder",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_perm_security_level_id"),
        "cmf_testcase_folder",
        ["perm_security_level_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_project_id"),
        "cmf_testcase_folder",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_resolution_id"),
        "cmf_testcase_folder",
        ["resolution_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_responsible_id"),
        "cmf_testcase_folder",
        ["responsible_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_root_parent_id"),
        "cmf_testcase_folder",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_scheme_wf_id"),
        "cmf_testcase_folder",
        ["scheme_wf_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_status_id"),
        "cmf_testcase_folder",
        ["status_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_tree_parent_id"),
        "cmf_testcase_folder",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_waiting_for_id"),
        "cmf_testcase_folder",
        ["waiting_for_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_workflow_id"),
        "cmf_testcase_folder",
        ["workflow_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcase_folder_cmf_owner_assistants",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cmf_owner_assistants_left_id"),
        "cmf_testcase_folder_cmf_owner_assistants",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cmf_owner_assistants_parent_id"),
        "cmf_testcase_folder_cmf_owner_assistants",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cmf_owner_assistants_right_id"),
        "cmf_testcase_folder_cmf_owner_assistants",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_cmf_owner_assistants_root_id"),
        "cmf_testcase_folder_cmf_owner_assistants",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcase_folder_executors",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_executors_left_id"),
        "cmf_testcase_folder_executors",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_executors_parent_id"),
        "cmf_testcase_folder_executors",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_executors_right_id"),
        "cmf_testcase_folder_executors",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_executors_root_id"),
        "cmf_testcase_folder_executors",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcase_folder_local_links",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_local_links_left_id"),
        "cmf_testcase_folder_local_links",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_local_links_parent_id"),
        "cmf_testcase_folder_local_links",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_local_links_right_id"),
        "cmf_testcase_folder_local_links",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_local_links_root_id"),
        "cmf_testcase_folder_local_links",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcase_folder_spectators",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_spectators_left_id"),
        "cmf_testcase_folder_spectators",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_spectators_parent_id"),
        "cmf_testcase_folder_spectators",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_spectators_right_id"),
        "cmf_testcase_folder_spectators",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_folder_spectators_root_id"),
        "cmf_testcase_folder_spectators",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcase_local_links",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_local_links_left_id"),
        "cmf_testcase_local_links",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_local_links_parent_id"),
        "cmf_testcase_local_links",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_local_links_right_id"),
        "cmf_testcase_local_links",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_local_links_root_id"),
        "cmf_testcase_local_links",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcase_params_row",
        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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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_testcase.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )

    op.create_table(
        "cmf_testcase_param",
        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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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("testcase_id", sa.String(length=64), nullable=False),
        sa.Column("param_id", sa.String(length=64), nullable=True),
        sa.Column("param_value_id", sa.String(length=64), nullable=True),
        sa.ForeignKeyConstraint(
            ["cmf_import_id"],
            ["cmf_import.id"],
        ),
        sa.ForeignKeyConstraint(
            ["param_id"],
            ["cmf_test_param.id"],
        ),
        sa.ForeignKeyConstraint(
            ["param_value_id"],
            ["cmf_test_param_value.id"],
        ),
        sa.ForeignKeyConstraint(
            ["parent_id"],
            ["cmf_testcase_params_row.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.ForeignKeyConstraint(
            ["testcase_id"],
            ["cmf_testcase.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_cmf_author_id"),
        "cmf_testcase_param",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_cmf_created_at"),
        "cmf_testcase_param",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_cmf_deleted"),
        "cmf_testcase_param",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_cmf_import_id"),
        "cmf_testcase_param",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_cmf_locked_at"),
        "cmf_testcase_param",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_cmf_locked_by_id"),
        "cmf_testcase_param",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_cmf_modified_at"),
        "cmf_testcase_param",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_cmf_modified_by_id"),
        "cmf_testcase_param",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_cmf_owner_id"),
        "cmf_testcase_param",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_cmf_version"),
        "cmf_testcase_param",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_cmf_viewed_at"),
        "cmf_testcase_param",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_code"),
        "cmf_testcase_param",
        ["code"],
        unique=True,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_name"),
        "cmf_testcase_param",
        ["name"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_orderno"),
        "cmf_testcase_param",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_param_id"),
        "cmf_testcase_param",
        ["param_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_param_value_id"),
        "cmf_testcase_param",
        ["param_value_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_parent_id"),
        "cmf_testcase_param",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_perm_acl_id"),
        "cmf_testcase_param",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_perm_parent_id"),
        "cmf_testcase_param",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_project_id"),
        "cmf_testcase_param",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_root_parent_id"),
        "cmf_testcase_param",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_testcase_id"),
        "cmf_testcase_param",
        ["testcase_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_param_tree_parent_id"),
        "cmf_testcase_param",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_cmf_author_id"),
        "cmf_testcase_params_row",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_cmf_created_at"),
        "cmf_testcase_params_row",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_cmf_deleted"),
        "cmf_testcase_params_row",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_cmf_import_id"),
        "cmf_testcase_params_row",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_cmf_locked_at"),
        "cmf_testcase_params_row",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_cmf_locked_by_id"),
        "cmf_testcase_params_row",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_cmf_modified_at"),
        "cmf_testcase_params_row",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_cmf_modified_by_id"),
        "cmf_testcase_params_row",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_cmf_owner_id"),
        "cmf_testcase_params_row",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_cmf_version"),
        "cmf_testcase_params_row",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_cmf_viewed_at"),
        "cmf_testcase_params_row",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_code"),
        "cmf_testcase_params_row",
        ["code"],
        unique=True,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_name"),
        "cmf_testcase_params_row",
        ["name"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_orderno"),
        "cmf_testcase_params_row",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_parent_id"),
        "cmf_testcase_params_row",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_perm_acl_id"),
        "cmf_testcase_params_row",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_perm_parent_id"),
        "cmf_testcase_params_row",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_project_id"),
        "cmf_testcase_params_row",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_root_parent_id"),
        "cmf_testcase_params_row",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_params_row_tree_parent_id"),
        "cmf_testcase_params_row",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcycle_testcase_folder",
        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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), nullable=True),
        sa.Column("is_public", sa.Boolean(), nullable=False),
        sa.Column("is_public_editable", sa.Boolean(), nullable=False),
        sa.Column("is_public_comments", sa.Boolean(), nullable=False),
        sa.Column("has_children_archived", sa.Boolean(), nullable=False),
        sa.Column("logic_prefix", sa.String(), nullable=True),
        sa.Column("ui_view_form", sa.String(length=32), nullable=False),
        sa.Column("parent_logic_prefix", sa.String(), nullable=True),
        sa.Column("ui_view_form_options", sa.TEXT(), nullable=False),
        sa.Column(
            "status_modified_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column(
            "status_in_progress_start",
            sa.TIMESTAMP(timezone=True),
            nullable=True,
        ),
        sa.Column(
            "status_in_progress_end",
            sa.TIMESTAMP(timezone=True),
            nullable=True,
        ),
        sa.Column(
            "status_review_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column(
            "status_closed_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("no_control", sa.Boolean(), nullable=False),
        sa.Column("priority", sa.Integer(), nullable=False),
        sa.Column("mark", sa.String(length=32), nullable=True),
        sa.Column(
            "user_rating", sa.Numeric(precision=14, scale=2), nullable=True
        ),
        sa.Column("user_rating_count", sa.Integer(), nullable=False),
        sa.Column("alarm_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column("deadline", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column(
            "plan_start_date", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("plan_end_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column(
            "period_next_date", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("period_interval", sa.String(length=32), nullable=True),
        sa.Column("is_template", sa.Boolean(), nullable=False),
        sa.Column("is_penalty", sa.Boolean(), nullable=False),
        sa.Column("cache_status_type", sa.String(length=32), nullable=True),
        sa.Column("cache_fields", sa.TEXT(), nullable=True),
        sa.Column("approved", sa.Boolean(), nullable=False),
        sa.Column("perm_policy", sa.String(length=32), nullable=False),
        sa.Column("perm_policy_guest", sa.String(length=32), nullable=False),
        sa.Column(
            "perm_policy_anonymous", sa.String(length=32), nullable=False
        ),
        sa.Column(
            "perm_policy_sharelink", sa.String(length=32), nullable=False
        ),
        sa.Column("sharelink_hash", sa.String(length=32), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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("workflow_id", sa.String(length=64), nullable=True),
        sa.Column(
            "default_task_workflow_id", sa.String(length=64), nullable=True
        ),
        sa.Column("logic_type_id", sa.String(length=64), nullable=True),
        sa.Column("scheme_wf_id", sa.String(length=64), nullable=True),
        sa.Column(
            "cmf_owner_assistant_id", sa.String(length=64), nullable=True
        ),
        sa.Column(
            "perm_security_level_id", sa.String(length=64), nullable=True
        ),
        sa.Column("resolution_id", sa.String(length=64), nullable=True),
        sa.Column("status_id", sa.String(length=64), nullable=True),
        sa.Column("company_id", sa.String(length=64), nullable=True),
        sa.Column("responsible_id", sa.String(length=64), nullable=True),
        sa.Column("waiting_for_id", sa.String(length=64), nullable=True),
        sa.Column("cloned_from_id", sa.String(length=64), nullable=True),
        sa.Column("activity_id", sa.String(length=64), nullable=True),
        sa.Column("cache_status_opt_id", sa.String(length=64), nullable=True),
        sa.Column(
            "tree_parent_folder_id", sa.String(length=64), nullable=True
        ),
        sa.Column(
            "test_configuration_id", sa.String(length=64), nullable=True
        ),
        sa.Column("environment_id", sa.String(length=64), nullable=True),
        sa.ForeignKeyConstraint(
            ["activity_id"],
            ["cmf_activity.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cache_status_opt_id"],
            ["cmf_status_opt.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cmf_import_id"],
            ["cmf_import.id"],
        ),
        sa.ForeignKeyConstraint(
            ["company_id"],
            ["cmf_company.id"],
        ),
        sa.ForeignKeyConstraint(
            ["default_task_workflow_id"],
            ["cmf_workflow.id"],
        ),
        sa.ForeignKeyConstraint(
            ["environment_id"],
            ["cmf_test_environment.id"],
        ),
        sa.ForeignKeyConstraint(
            ["logic_type_id"],
            ["cmf_logic_type.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_security_level_id"],
            ["cmf_security_level.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.ForeignKeyConstraint(
            ["resolution_id"],
            ["cmf_resolution.id"],
        ),
        sa.ForeignKeyConstraint(
            ["scheme_wf_id"],
            ["cmf_scheme_wf.id"],
        ),
        sa.ForeignKeyConstraint(
            ["status_id"],
            ["cmf_status.id"],
        ),
        sa.ForeignKeyConstraint(
            ["test_configuration_id"],
            ["cmf_test_configuration.id"],
        ),
        sa.ForeignKeyConstraint(
            ["workflow_id"],
            ["cmf_workflow.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_table(
        "cmf_testcycle_testcase_result",
        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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), nullable=True),
        sa.Column("is_public", sa.Boolean(), nullable=False),
        sa.Column("is_public_editable", sa.Boolean(), nullable=False),
        sa.Column("is_public_comments", sa.Boolean(), nullable=False),
        sa.Column("has_children_archived", sa.Boolean(), nullable=False),
        sa.Column("logic_prefix", sa.String(), nullable=True),
        sa.Column("ui_view_form", sa.String(length=32), nullable=False),
        sa.Column("parent_logic_prefix", sa.String(), nullable=True),
        sa.Column("ui_view_form_options", sa.TEXT(), nullable=False),
        sa.Column(
            "status_modified_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column(
            "status_in_progress_start",
            sa.TIMESTAMP(timezone=True),
            nullable=True,
        ),
        sa.Column(
            "status_in_progress_end",
            sa.TIMESTAMP(timezone=True),
            nullable=True,
        ),
        sa.Column(
            "status_review_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column(
            "status_closed_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("no_control", sa.Boolean(), nullable=False),
        sa.Column("priority", sa.Integer(), nullable=False),
        sa.Column("mark", sa.String(length=32), nullable=True),
        sa.Column(
            "user_rating", sa.Numeric(precision=14, scale=2), nullable=True
        ),
        sa.Column("user_rating_count", sa.Integer(), nullable=False),
        sa.Column("alarm_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column("deadline", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column(
            "plan_start_date", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("plan_end_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column(
            "period_next_date", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("period_interval", sa.String(length=32), nullable=True),
        sa.Column("is_template", sa.Boolean(), nullable=False),
        sa.Column("is_penalty", sa.Boolean(), nullable=False),
        sa.Column("cache_status_type", sa.String(length=32), nullable=True),
        sa.Column("cache_fields", sa.TEXT(), nullable=True),
        sa.Column("approved", sa.Boolean(), nullable=False),
        sa.Column("perm_policy", sa.String(length=32), nullable=False),
        sa.Column("perm_policy_guest", sa.String(length=32), nullable=False),
        sa.Column(
            "perm_policy_anonymous", sa.String(length=32), nullable=False
        ),
        sa.Column(
            "perm_policy_sharelink", sa.String(length=32), nullable=False
        ),
        sa.Column("sharelink_hash", sa.String(length=32), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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("workflow_id", sa.String(length=64), nullable=True),
        sa.Column(
            "default_task_workflow_id", sa.String(length=64), nullable=True
        ),
        sa.Column("logic_type_id", sa.String(length=64), nullable=True),
        sa.Column("scheme_wf_id", sa.String(length=64), nullable=True),
        sa.Column(
            "cmf_owner_assistant_id", sa.String(length=64), nullable=True
        ),
        sa.Column(
            "perm_security_level_id", sa.String(length=64), nullable=True
        ),
        sa.Column("resolution_id", sa.String(length=64), nullable=True),
        sa.Column("status_id", sa.String(length=64), nullable=True),
        sa.Column("company_id", sa.String(length=64), nullable=True),
        sa.Column("responsible_id", sa.String(length=64), nullable=True),
        sa.Column("waiting_for_id", sa.String(length=64), nullable=True),
        sa.Column("cloned_from_id", sa.String(length=64), nullable=True),
        sa.Column("activity_id", sa.String(length=64), nullable=True),
        sa.Column("cache_status_opt_id", sa.String(length=64), nullable=True),
        sa.Column(
            "testcycle_testcase_folder_id", sa.String(length=64), nullable=True
        ),
        sa.Column("testcase_id", sa.String(length=64), nullable=True),
        sa.Column(
            "test_configuration_id", sa.String(length=64), nullable=True
        ),
        sa.Column("environment_id", sa.String(length=64), nullable=True),
        sa.ForeignKeyConstraint(
            ["activity_id"],
            ["cmf_activity.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cache_status_opt_id"],
            ["cmf_status_opt.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cmf_import_id"],
            ["cmf_import.id"],
        ),
        sa.ForeignKeyConstraint(
            ["company_id"],
            ["cmf_company.id"],
        ),
        sa.ForeignKeyConstraint(
            ["default_task_workflow_id"],
            ["cmf_workflow.id"],
        ),
        sa.ForeignKeyConstraint(
            ["environment_id"],
            ["cmf_test_environment.id"],
        ),
        sa.ForeignKeyConstraint(
            ["logic_type_id"],
            ["cmf_logic_type.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_security_level_id"],
            ["cmf_security_level.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.ForeignKeyConstraint(
            ["resolution_id"],
            ["cmf_resolution.id"],
        ),
        sa.ForeignKeyConstraint(
            ["scheme_wf_id"],
            ["cmf_scheme_wf.id"],
        ),
        sa.ForeignKeyConstraint(
            ["status_id"],
            ["cmf_status.id"],
        ),
        sa.ForeignKeyConstraint(
            ["test_configuration_id"],
            ["cmf_test_configuration.id"],
        ),
        sa.ForeignKeyConstraint(
            ["testcase_id"],
            ["cmf_testcase.id"],
        ),
        sa.ForeignKeyConstraint(
            ["testcycle_testcase_folder_id"],
            ["cmf_testcycle_testcase_folder.id"],
        ),
        sa.ForeignKeyConstraint(
            ["workflow_id"],
            ["cmf_workflow.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )

    op.create_table(
        "cmf_testcase_run",
        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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), nullable=True),
        sa.Column("is_public", sa.Boolean(), nullable=False),
        sa.Column("is_public_editable", sa.Boolean(), nullable=False),
        sa.Column("is_public_comments", sa.Boolean(), nullable=False),
        sa.Column("has_children_archived", sa.Boolean(), nullable=False),
        sa.Column("logic_prefix", sa.String(), nullable=True),
        sa.Column("ui_view_form", sa.String(length=32), nullable=False),
        sa.Column("parent_logic_prefix", sa.String(), nullable=True),
        sa.Column("ui_view_form_options", sa.TEXT(), nullable=False),
        sa.Column(
            "status_modified_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column(
            "status_in_progress_start",
            sa.TIMESTAMP(timezone=True),
            nullable=True,
        ),
        sa.Column(
            "status_in_progress_end",
            sa.TIMESTAMP(timezone=True),
            nullable=True,
        ),
        sa.Column(
            "status_review_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column(
            "status_closed_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("no_control", sa.Boolean(), nullable=False),
        sa.Column("priority", sa.Integer(), nullable=False),
        sa.Column("mark", sa.String(length=32), nullable=True),
        sa.Column(
            "user_rating", sa.Numeric(precision=14, scale=2), nullable=True
        ),
        sa.Column("user_rating_count", sa.Integer(), nullable=False),
        sa.Column("alarm_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column("deadline", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column(
            "plan_start_date", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("plan_end_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column(
            "period_next_date", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("period_interval", sa.String(length=32), nullable=True),
        sa.Column("is_template", sa.Boolean(), nullable=False),
        sa.Column("is_penalty", sa.Boolean(), nullable=False),
        sa.Column("cache_status_type", sa.String(length=32), nullable=True),
        sa.Column("cache_fields", sa.TEXT(), nullable=True),
        sa.Column("approved", sa.Boolean(), nullable=False),
        sa.Column("perm_policy", sa.String(length=32), nullable=False),
        sa.Column("perm_policy_guest", sa.String(length=32), nullable=False),
        sa.Column(
            "perm_policy_anonymous", sa.String(length=32), nullable=False
        ),
        sa.Column(
            "perm_policy_sharelink", sa.String(length=32), nullable=False
        ),
        sa.Column("sharelink_hash", sa.String(length=32), nullable=True),
        sa.Column("time_spent", sa.Integer(), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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("workflow_id", sa.String(length=64), nullable=True),
        sa.Column(
            "default_task_workflow_id", sa.String(length=64), nullable=True
        ),
        sa.Column("logic_type_id", sa.String(length=64), nullable=True),
        sa.Column("scheme_wf_id", sa.String(length=64), nullable=True),
        sa.Column(
            "cmf_owner_assistant_id", sa.String(length=64), nullable=True
        ),
        sa.Column(
            "perm_security_level_id", sa.String(length=64), nullable=True
        ),
        sa.Column("resolution_id", sa.String(length=64), nullable=True),
        sa.Column("status_id", sa.String(length=64), nullable=True),
        sa.Column("company_id", sa.String(length=64), nullable=True),
        sa.Column("responsible_id", sa.String(length=64), nullable=True),
        sa.Column("waiting_for_id", sa.String(length=64), nullable=True),
        sa.Column("cloned_from_id", sa.String(length=64), nullable=True),
        sa.Column("activity_id", sa.String(length=64), nullable=True),
        sa.Column("cache_status_opt_id", sa.String(length=64), nullable=True),
        sa.Column(
            "testcycle_testcase_folder_id", sa.String(length=64), nullable=True
        ),
        sa.Column("testcase_id", sa.String(length=64), nullable=True),
        sa.Column(
            "testcycle_testcase_result_id",
            sa.String(length=64),
            nullable=False,
        ),
        sa.Column(
            "test_configuration_id", sa.String(length=64), nullable=True
        ),
        sa.Column("release_id", sa.String(length=64), nullable=True),
        sa.ForeignKeyConstraint(
            ["activity_id"],
            ["cmf_activity.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cache_status_opt_id"],
            ["cmf_status_opt.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cmf_import_id"],
            ["cmf_import.id"],
        ),
        sa.ForeignKeyConstraint(
            ["company_id"],
            ["cmf_company.id"],
        ),
        sa.ForeignKeyConstraint(
            ["default_task_workflow_id"],
            ["cmf_workflow.id"],
        ),
        sa.ForeignKeyConstraint(
            ["logic_type_id"],
            ["cmf_logic_type.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_security_level_id"],
            ["cmf_security_level.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.ForeignKeyConstraint(
            ["release_id"],
            ["cmf_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["resolution_id"],
            ["cmf_resolution.id"],
        ),
        sa.ForeignKeyConstraint(
            ["scheme_wf_id"],
            ["cmf_scheme_wf.id"],
        ),
        sa.ForeignKeyConstraint(
            ["status_id"],
            ["cmf_status.id"],
        ),
        sa.ForeignKeyConstraint(
            ["test_configuration_id"],
            ["cmf_test_configuration.id"],
        ),
        sa.ForeignKeyConstraint(
            ["testcase_id"],
            ["cmf_testcase.id"],
        ),
        sa.ForeignKeyConstraint(
            ["testcycle_testcase_folder_id"],
            ["cmf_testcycle_testcase_folder.id"],
        ),
        sa.ForeignKeyConstraint(
            ["testcycle_testcase_result_id"],
            ["cmf_testcycle_testcase_result.id"],
        ),
        sa.ForeignKeyConstraint(
            ["workflow_id"],
            ["cmf_workflow.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_activity_id"),
        "cmf_testcase_run",
        ["activity_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_alarm_date"),
        "cmf_testcase_run",
        ["alarm_date"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_approved"),
        "cmf_testcase_run",
        ["approved"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cache_status_opt_id"),
        "cmf_testcase_run",
        ["cache_status_opt_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cache_status_type"),
        "cmf_testcase_run",
        ["cache_status_type"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cloned_from_id"),
        "cmf_testcase_run",
        ["cloned_from_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cmf_author_id"),
        "cmf_testcase_run",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cmf_created_at"),
        "cmf_testcase_run",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cmf_deleted"),
        "cmf_testcase_run",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cmf_import_id"),
        "cmf_testcase_run",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cmf_locked_at"),
        "cmf_testcase_run",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cmf_locked_by_id"),
        "cmf_testcase_run",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cmf_modified_at"),
        "cmf_testcase_run",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cmf_modified_by_id"),
        "cmf_testcase_run",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cmf_owner_assistant_id"),
        "cmf_testcase_run",
        ["cmf_owner_assistant_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cmf_owner_id"),
        "cmf_testcase_run",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cmf_version"),
        "cmf_testcase_run",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cmf_viewed_at"),
        "cmf_testcase_run",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_code"),
        "cmf_testcase_run",
        ["code"],
        unique=True,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_company_id"),
        "cmf_testcase_run",
        ["company_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_deadline"),
        "cmf_testcase_run",
        ["deadline"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_default_task_workflow_id"),
        "cmf_testcase_run",
        ["default_task_workflow_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_is_template"),
        "cmf_testcase_run",
        ["is_template"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_logic_prefix"),
        "cmf_testcase_run",
        ["logic_prefix"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_logic_type_id"),
        "cmf_testcase_run",
        ["logic_type_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_name"),
        "cmf_testcase_run",
        ["name"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_orderno"),
        "cmf_testcase_run",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_parent_id"),
        "cmf_testcase_run",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_parent_logic_prefix"),
        "cmf_testcase_run",
        ["parent_logic_prefix"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_perm_acl_id"),
        "cmf_testcase_run",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_perm_parent_id"),
        "cmf_testcase_run",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_perm_security_level_id"),
        "cmf_testcase_run",
        ["perm_security_level_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_project_id"),
        "cmf_testcase_run",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_release_id"),
        "cmf_testcase_run",
        ["release_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_resolution_id"),
        "cmf_testcase_run",
        ["resolution_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_responsible_id"),
        "cmf_testcase_run",
        ["responsible_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_root_parent_id"),
        "cmf_testcase_run",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_scheme_wf_id"),
        "cmf_testcase_run",
        ["scheme_wf_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_status_id"),
        "cmf_testcase_run",
        ["status_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_test_configuration_id"),
        "cmf_testcase_run",
        ["test_configuration_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_testcase_id"),
        "cmf_testcase_run",
        ["testcase_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_testcycle_testcase_folder_id"),
        "cmf_testcase_run",
        ["testcycle_testcase_folder_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_testcycle_testcase_result_id"),
        "cmf_testcase_run",
        ["testcycle_testcase_result_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_tree_parent_id"),
        "cmf_testcase_run",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_waiting_for_id"),
        "cmf_testcase_run",
        ["waiting_for_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_workflow_id"),
        "cmf_testcase_run",
        ["workflow_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcase_run_cmf_owner_assistants",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cmf_owner_assistants_left_id"),
        "cmf_testcase_run_cmf_owner_assistants",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cmf_owner_assistants_parent_id"),
        "cmf_testcase_run_cmf_owner_assistants",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cmf_owner_assistants_right_id"),
        "cmf_testcase_run_cmf_owner_assistants",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_cmf_owner_assistants_root_id"),
        "cmf_testcase_run_cmf_owner_assistants",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcase_run_executors",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_executors_left_id"),
        "cmf_testcase_run_executors",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_executors_parent_id"),
        "cmf_testcase_run_executors",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_executors_right_id"),
        "cmf_testcase_run_executors",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_executors_root_id"),
        "cmf_testcase_run_executors",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcase_run_local_links",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_local_links_left_id"),
        "cmf_testcase_run_local_links",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_local_links_parent_id"),
        "cmf_testcase_run_local_links",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_local_links_right_id"),
        "cmf_testcase_run_local_links",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_local_links_root_id"),
        "cmf_testcase_run_local_links",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcase_run_spectators",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_spectators_left_id"),
        "cmf_testcase_run_spectators",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_spectators_parent_id"),
        "cmf_testcase_run_spectators",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_spectators_right_id"),
        "cmf_testcase_run_spectators",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_spectators_root_id"),
        "cmf_testcase_run_spectators",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcase_step",
        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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), nullable=True),
        sa.Column("step_section", sa.String(length=32), nullable=True),
        sa.Column("expected_result", sa.TEXT(), nullable=True),
        sa.Column("test_data", sa.TEXT(), nullable=True),
        sa.Column("comment", sa.TEXT(), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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("testcase_template_id", sa.String(length=64), nullable=True),
        sa.ForeignKeyConstraint(
            ["cmf_import_id"],
            ["cmf_import.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.ForeignKeyConstraint(
            ["testcase_template_id"],
            ["cmf_testcase.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )

    op.create_table(
        "cmf_testcase_run_step",
        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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), nullable=True),
        sa.Column("step_section", sa.String(length=32), nullable=True),
        sa.Column("expected_result", sa.TEXT(), nullable=True),
        sa.Column("actual_result", sa.TEXT(), nullable=True),
        sa.Column("test_data", sa.TEXT(), nullable=True),
        sa.Column("comment", sa.TEXT(), nullable=True),
        sa.Column("group", sa.Integer(), nullable=True),
        sa.Column("status", sa.String(length=32), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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("testcase_id", sa.String(length=64), nullable=True),
        sa.Column("testcase_step_id", sa.String(length=64), nullable=True),
        sa.ForeignKeyConstraint(
            ["cmf_import_id"],
            ["cmf_import.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.ForeignKeyConstraint(
            ["testcase_id"],
            ["cmf_testcase.id"],
        ),
        sa.ForeignKeyConstraint(
            ["testcase_step_id"],
            ["cmf_testcase_step.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_cmf_author_id"),
        "cmf_testcase_run_step",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_cmf_created_at"),
        "cmf_testcase_run_step",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_cmf_deleted"),
        "cmf_testcase_run_step",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_cmf_import_id"),
        "cmf_testcase_run_step",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_cmf_locked_at"),
        "cmf_testcase_run_step",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_cmf_locked_by_id"),
        "cmf_testcase_run_step",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_cmf_modified_at"),
        "cmf_testcase_run_step",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_cmf_modified_by_id"),
        "cmf_testcase_run_step",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_cmf_owner_id"),
        "cmf_testcase_run_step",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_cmf_version"),
        "cmf_testcase_run_step",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_cmf_viewed_at"),
        "cmf_testcase_run_step",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_code"),
        "cmf_testcase_run_step",
        ["code"],
        unique=True,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_name"),
        "cmf_testcase_run_step",
        ["name"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_orderno"),
        "cmf_testcase_run_step",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_parent_id"),
        "cmf_testcase_run_step",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_perm_acl_id"),
        "cmf_testcase_run_step",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_perm_parent_id"),
        "cmf_testcase_run_step",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_project_id"),
        "cmf_testcase_run_step",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_root_parent_id"),
        "cmf_testcase_run_step",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_testcase_id"),
        "cmf_testcase_run_step",
        ["testcase_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_testcase_step_id"),
        "cmf_testcase_run_step",
        ["testcase_step_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_run_step_tree_parent_id"),
        "cmf_testcase_run_step",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcase_spectators",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcase_spectators_left_id"),
        "cmf_testcase_spectators",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_spectators_parent_id"),
        "cmf_testcase_spectators",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_spectators_right_id"),
        "cmf_testcase_spectators",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_spectators_root_id"),
        "cmf_testcase_spectators",
        ["root_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_cmf_author_id"),
        "cmf_testcase_step",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_cmf_created_at"),
        "cmf_testcase_step",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_cmf_deleted"),
        "cmf_testcase_step",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_cmf_import_id"),
        "cmf_testcase_step",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_cmf_locked_at"),
        "cmf_testcase_step",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_cmf_locked_by_id"),
        "cmf_testcase_step",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_cmf_modified_at"),
        "cmf_testcase_step",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_cmf_modified_by_id"),
        "cmf_testcase_step",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_cmf_owner_id"),
        "cmf_testcase_step",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_cmf_version"),
        "cmf_testcase_step",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_cmf_viewed_at"),
        "cmf_testcase_step",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_code"),
        "cmf_testcase_step",
        ["code"],
        unique=True,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_name"),
        "cmf_testcase_step",
        ["name"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_orderno"),
        "cmf_testcase_step",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_parent_id"),
        "cmf_testcase_step",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_perm_acl_id"),
        "cmf_testcase_step",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_perm_parent_id"),
        "cmf_testcase_step",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_project_id"),
        "cmf_testcase_step",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_root_parent_id"),
        "cmf_testcase_step",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_testcase_template_id"),
        "cmf_testcase_step",
        ["testcase_template_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcase_step_tree_parent_id"),
        "cmf_testcase_step",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testplan",
        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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), nullable=True),
        sa.Column("is_public", sa.Boolean(), nullable=False),
        sa.Column("is_public_editable", sa.Boolean(), nullable=False),
        sa.Column("is_public_comments", sa.Boolean(), nullable=False),
        sa.Column("has_children_archived", sa.Boolean(), nullable=False),
        sa.Column("logic_prefix", sa.String(), nullable=True),
        sa.Column("ui_view_form", sa.String(length=32), nullable=False),
        sa.Column("parent_logic_prefix", sa.String(), nullable=True),
        sa.Column("ui_view_form_options", sa.TEXT(), nullable=False),
        sa.Column(
            "status_modified_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column(
            "status_in_progress_start",
            sa.TIMESTAMP(timezone=True),
            nullable=True,
        ),
        sa.Column(
            "status_in_progress_end",
            sa.TIMESTAMP(timezone=True),
            nullable=True,
        ),
        sa.Column(
            "status_review_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column(
            "status_closed_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("no_control", sa.Boolean(), nullable=False),
        sa.Column("priority", sa.Integer(), nullable=False),
        sa.Column("mark", sa.String(length=32), nullable=True),
        sa.Column(
            "user_rating", sa.Numeric(precision=14, scale=2), nullable=True
        ),
        sa.Column("user_rating_count", sa.Integer(), nullable=False),
        sa.Column("alarm_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column("deadline", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column(
            "plan_start_date", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("plan_end_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column(
            "period_next_date", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("period_interval", sa.String(length=32), nullable=True),
        sa.Column("is_template", sa.Boolean(), nullable=False),
        sa.Column("is_penalty", sa.Boolean(), nullable=False),
        sa.Column("cache_status_type", sa.String(length=32), nullable=True),
        sa.Column("cache_fields", sa.TEXT(), nullable=True),
        sa.Column("approved", sa.Boolean(), nullable=False),
        sa.Column("perm_policy", sa.String(length=32), nullable=False),
        sa.Column("perm_policy_guest", sa.String(length=32), nullable=False),
        sa.Column(
            "perm_policy_anonymous", sa.String(length=32), nullable=False
        ),
        sa.Column(
            "perm_policy_sharelink", sa.String(length=32), nullable=False
        ),
        sa.Column("sharelink_hash", sa.String(length=32), nullable=True),
        sa.Column("product", sa.String(), nullable=True),
        sa.Column("type", sa.String(length=32), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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("workflow_id", sa.String(length=64), nullable=True),
        sa.Column(
            "default_task_workflow_id", sa.String(length=64), nullable=True
        ),
        sa.Column("logic_type_id", sa.String(length=64), nullable=True),
        sa.Column("scheme_wf_id", sa.String(length=64), nullable=True),
        sa.Column(
            "cmf_owner_assistant_id", sa.String(length=64), nullable=True
        ),
        sa.Column(
            "perm_security_level_id", sa.String(length=64), nullable=True
        ),
        sa.Column("resolution_id", sa.String(length=64), nullable=True),
        sa.Column("status_id", sa.String(length=64), nullable=True),
        sa.Column("company_id", sa.String(length=64), nullable=True),
        sa.Column("responsible_id", sa.String(length=64), nullable=True),
        sa.Column("waiting_for_id", sa.String(length=64), nullable=True),
        sa.Column("cloned_from_id", sa.String(length=64), nullable=True),
        sa.Column("activity_id", sa.String(length=64), nullable=True),
        sa.Column("cache_status_opt_id", sa.String(length=64), nullable=True),
        sa.Column("release_id", sa.String(length=64), nullable=True),
        sa.Column("environment_id", sa.String(length=64), nullable=True),
        sa.ForeignKeyConstraint(
            ["activity_id"],
            ["cmf_activity.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cache_status_opt_id"],
            ["cmf_status_opt.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cmf_import_id"],
            ["cmf_import.id"],
        ),
        sa.ForeignKeyConstraint(
            ["company_id"],
            ["cmf_company.id"],
        ),
        sa.ForeignKeyConstraint(
            ["default_task_workflow_id"],
            ["cmf_workflow.id"],
        ),
        sa.ForeignKeyConstraint(
            ["environment_id"],
            ["cmf_test_environment.id"],
        ),
        sa.ForeignKeyConstraint(
            ["logic_type_id"],
            ["cmf_logic_type.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_security_level_id"],
            ["cmf_security_level.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.ForeignKeyConstraint(
            ["release_id"],
            ["cmf_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["resolution_id"],
            ["cmf_resolution.id"],
        ),
        sa.ForeignKeyConstraint(
            ["scheme_wf_id"],
            ["cmf_scheme_wf.id"],
        ),
        sa.ForeignKeyConstraint(
            ["status_id"],
            ["cmf_status.id"],
        ),
        sa.ForeignKeyConstraint(
            ["workflow_id"],
            ["cmf_workflow.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )

    op.create_table(
        "cmf_testcycle",
        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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), nullable=True),
        sa.Column("is_public", sa.Boolean(), nullable=False),
        sa.Column("is_public_editable", sa.Boolean(), nullable=False),
        sa.Column("is_public_comments", sa.Boolean(), nullable=False),
        sa.Column("has_children_archived", sa.Boolean(), nullable=False),
        sa.Column("logic_prefix", sa.String(), nullable=True),
        sa.Column("ui_view_form", sa.String(length=32), nullable=False),
        sa.Column("parent_logic_prefix", sa.String(), nullable=True),
        sa.Column("ui_view_form_options", sa.TEXT(), nullable=False),
        sa.Column("resolution", sa.String(length=32), nullable=True),
        sa.Column(
            "status_modified_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column(
            "status_in_progress_start",
            sa.TIMESTAMP(timezone=True),
            nullable=True,
        ),
        sa.Column(
            "status_in_progress_end",
            sa.TIMESTAMP(timezone=True),
            nullable=True,
        ),
        sa.Column(
            "status_review_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column(
            "status_closed_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("no_control", sa.Boolean(), nullable=False),
        sa.Column("priority", sa.Integer(), nullable=False),
        sa.Column("mark", sa.String(length=32), nullable=True),
        sa.Column(
            "user_rating", sa.Numeric(precision=14, scale=2), nullable=True
        ),
        sa.Column("user_rating_count", sa.Integer(), nullable=False),
        sa.Column("alarm_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column("deadline", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column(
            "plan_start_date", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("plan_end_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column(
            "period_next_date", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("period_interval", sa.String(length=32), nullable=True),
        sa.Column("is_template", sa.Boolean(), nullable=False),
        sa.Column("is_penalty", sa.Boolean(), nullable=False),
        sa.Column("cache_status_type", sa.String(length=32), nullable=True),
        sa.Column("cache_fields", sa.TEXT(), nullable=True),
        sa.Column("approved", sa.Boolean(), nullable=False),
        sa.Column("perm_policy", sa.String(length=32), nullable=False),
        sa.Column("perm_policy_guest", sa.String(length=32), nullable=False),
        sa.Column(
            "perm_policy_anonymous", sa.String(length=32), nullable=False
        ),
        sa.Column(
            "perm_policy_sharelink", sa.String(length=32), nullable=False
        ),
        sa.Column("sharelink_hash", sa.String(length=32), nullable=True),
        sa.Column("start_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column("finish_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column("automation_status", sa.String(length=32), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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("workflow_id", sa.String(length=64), nullable=True),
        sa.Column(
            "default_task_workflow_id", sa.String(length=64), nullable=True
        ),
        sa.Column("logic_type_id", sa.String(length=64), nullable=True),
        sa.Column("scheme_wf_id", sa.String(length=64), nullable=True),
        sa.Column(
            "cmf_owner_assistant_id", sa.String(length=64), nullable=True
        ),
        sa.Column(
            "perm_security_level_id", sa.String(length=64), nullable=True
        ),
        sa.Column("status_id", sa.String(length=64), nullable=True),
        sa.Column("company_id", sa.String(length=64), nullable=True),
        sa.Column("responsible_id", sa.String(length=64), nullable=True),
        sa.Column("waiting_for_id", sa.String(length=64), nullable=True),
        sa.Column("cloned_from_id", sa.String(length=64), nullable=True),
        sa.Column("activity_id", sa.String(length=64), nullable=True),
        sa.Column("cache_status_opt_id", sa.String(length=64), nullable=True),
        sa.Column("testplan_id", sa.String(length=64), nullable=False),
        sa.Column(
            "test_configuration_id", sa.String(length=64), nullable=True
        ),
        sa.Column("release_id", sa.String(length=64), nullable=True),
        sa.Column(
            "default_responsible_id", sa.String(length=64), nullable=True
        ),
        sa.Column("environment_id", sa.String(length=64), nullable=True),
        sa.ForeignKeyConstraint(
            ["activity_id"],
            ["cmf_activity.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cache_status_opt_id"],
            ["cmf_status_opt.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cmf_import_id"],
            ["cmf_import.id"],
        ),
        sa.ForeignKeyConstraint(
            ["company_id"],
            ["cmf_company.id"],
        ),
        sa.ForeignKeyConstraint(
            ["default_responsible_id"],
            ["cmf_person.id"],
        ),
        sa.ForeignKeyConstraint(
            ["default_task_workflow_id"],
            ["cmf_workflow.id"],
        ),
        sa.ForeignKeyConstraint(
            ["environment_id"],
            ["cmf_test_environment.id"],
        ),
        sa.ForeignKeyConstraint(
            ["logic_type_id"],
            ["cmf_logic_type.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_security_level_id"],
            ["cmf_security_level.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.ForeignKeyConstraint(
            ["release_id"],
            ["cmf_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["scheme_wf_id"],
            ["cmf_scheme_wf.id"],
        ),
        sa.ForeignKeyConstraint(
            ["status_id"],
            ["cmf_status.id"],
        ),
        sa.ForeignKeyConstraint(
            ["test_configuration_id"],
            ["cmf_test_configuration.id"],
        ),
        sa.ForeignKeyConstraint(
            ["testplan_id"],
            ["cmf_testplan.id"],
        ),
        sa.ForeignKeyConstraint(
            ["workflow_id"],
            ["cmf_workflow.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcycle_activity_id"),
        "cmf_testcycle",
        ["activity_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_alarm_date"),
        "cmf_testcycle",
        ["alarm_date"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_approved"),
        "cmf_testcycle",
        ["approved"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cache_status_opt_id"),
        "cmf_testcycle",
        ["cache_status_opt_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cache_status_type"),
        "cmf_testcycle",
        ["cache_status_type"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cloned_from_id"),
        "cmf_testcycle",
        ["cloned_from_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cmf_author_id"),
        "cmf_testcycle",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cmf_created_at"),
        "cmf_testcycle",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cmf_deleted"),
        "cmf_testcycle",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cmf_import_id"),
        "cmf_testcycle",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cmf_locked_at"),
        "cmf_testcycle",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cmf_locked_by_id"),
        "cmf_testcycle",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cmf_modified_at"),
        "cmf_testcycle",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cmf_modified_by_id"),
        "cmf_testcycle",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cmf_owner_assistant_id"),
        "cmf_testcycle",
        ["cmf_owner_assistant_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cmf_owner_id"),
        "cmf_testcycle",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cmf_version"),
        "cmf_testcycle",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cmf_viewed_at"),
        "cmf_testcycle",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_code"), "cmf_testcycle", ["code"], unique=True
    )
    op.create_index(
        op.f("ix_cmf_testcycle_company_id"),
        "cmf_testcycle",
        ["company_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_deadline"),
        "cmf_testcycle",
        ["deadline"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_default_responsible_id"),
        "cmf_testcycle",
        ["default_responsible_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_default_task_workflow_id"),
        "cmf_testcycle",
        ["default_task_workflow_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_environment_id"),
        "cmf_testcycle",
        ["environment_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_is_template"),
        "cmf_testcycle",
        ["is_template"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_logic_prefix"),
        "cmf_testcycle",
        ["logic_prefix"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_logic_type_id"),
        "cmf_testcycle",
        ["logic_type_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_name"), "cmf_testcycle", ["name"], unique=False
    )
    op.create_index(
        op.f("ix_cmf_testcycle_orderno"),
        "cmf_testcycle",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_parent_id"),
        "cmf_testcycle",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_parent_logic_prefix"),
        "cmf_testcycle",
        ["parent_logic_prefix"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_perm_acl_id"),
        "cmf_testcycle",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_perm_parent_id"),
        "cmf_testcycle",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_perm_security_level_id"),
        "cmf_testcycle",
        ["perm_security_level_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_project_id"),
        "cmf_testcycle",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_release_id"),
        "cmf_testcycle",
        ["release_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_responsible_id"),
        "cmf_testcycle",
        ["responsible_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_root_parent_id"),
        "cmf_testcycle",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_scheme_wf_id"),
        "cmf_testcycle",
        ["scheme_wf_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_status_id"),
        "cmf_testcycle",
        ["status_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_test_configuration_id"),
        "cmf_testcycle",
        ["test_configuration_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testplan_id"),
        "cmf_testcycle",
        ["testplan_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_tree_parent_id"),
        "cmf_testcycle",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_waiting_for_id"),
        "cmf_testcycle",
        ["waiting_for_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_workflow_id"),
        "cmf_testcycle",
        ["workflow_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcycle_cmf_owner_assistants",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cmf_owner_assistants_left_id"),
        "cmf_testcycle_cmf_owner_assistants",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cmf_owner_assistants_parent_id"),
        "cmf_testcycle_cmf_owner_assistants",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cmf_owner_assistants_right_id"),
        "cmf_testcycle_cmf_owner_assistants",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_cmf_owner_assistants_root_id"),
        "cmf_testcycle_cmf_owner_assistants",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcycle_executors",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcycle_executors_left_id"),
        "cmf_testcycle_executors",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_executors_parent_id"),
        "cmf_testcycle_executors",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_executors_right_id"),
        "cmf_testcycle_executors",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_executors_root_id"),
        "cmf_testcycle_executors",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcycle_local_links",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcycle_local_links_left_id"),
        "cmf_testcycle_local_links",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_local_links_parent_id"),
        "cmf_testcycle_local_links",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_local_links_right_id"),
        "cmf_testcycle_local_links",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_local_links_root_id"),
        "cmf_testcycle_local_links",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcycle_spectators",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcycle_spectators_left_id"),
        "cmf_testcycle_spectators",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_spectators_parent_id"),
        "cmf_testcycle_spectators",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_spectators_right_id"),
        "cmf_testcycle_spectators",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_spectators_root_id"),
        "cmf_testcycle_spectators",
        ["root_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_activity_id"),
        "cmf_testcycle_testcase_folder",
        ["activity_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_alarm_date"),
        "cmf_testcycle_testcase_folder",
        ["alarm_date"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_approved"),
        "cmf_testcycle_testcase_folder",
        ["approved"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cache_status_opt_id"),
        "cmf_testcycle_testcase_folder",
        ["cache_status_opt_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cache_status_type"),
        "cmf_testcycle_testcase_folder",
        ["cache_status_type"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cloned_from_id"),
        "cmf_testcycle_testcase_folder",
        ["cloned_from_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_author_id"),
        "cmf_testcycle_testcase_folder",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_created_at"),
        "cmf_testcycle_testcase_folder",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_deleted"),
        "cmf_testcycle_testcase_folder",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_import_id"),
        "cmf_testcycle_testcase_folder",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_locked_at"),
        "cmf_testcycle_testcase_folder",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_locked_by_id"),
        "cmf_testcycle_testcase_folder",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_modified_at"),
        "cmf_testcycle_testcase_folder",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_modified_by_id"),
        "cmf_testcycle_testcase_folder",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_owner_assistant_id"),
        "cmf_testcycle_testcase_folder",
        ["cmf_owner_assistant_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_owner_id"),
        "cmf_testcycle_testcase_folder",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_version"),
        "cmf_testcycle_testcase_folder",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_viewed_at"),
        "cmf_testcycle_testcase_folder",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_code"),
        "cmf_testcycle_testcase_folder",
        ["code"],
        unique=True,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_company_id"),
        "cmf_testcycle_testcase_folder",
        ["company_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_deadline"),
        "cmf_testcycle_testcase_folder",
        ["deadline"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_default_task_workflow_id"),
        "cmf_testcycle_testcase_folder",
        ["default_task_workflow_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_environment_id"),
        "cmf_testcycle_testcase_folder",
        ["environment_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_is_template"),
        "cmf_testcycle_testcase_folder",
        ["is_template"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_logic_prefix"),
        "cmf_testcycle_testcase_folder",
        ["logic_prefix"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_logic_type_id"),
        "cmf_testcycle_testcase_folder",
        ["logic_type_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_name"),
        "cmf_testcycle_testcase_folder",
        ["name"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_orderno"),
        "cmf_testcycle_testcase_folder",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_parent_id"),
        "cmf_testcycle_testcase_folder",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_parent_logic_prefix"),
        "cmf_testcycle_testcase_folder",
        ["parent_logic_prefix"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_perm_acl_id"),
        "cmf_testcycle_testcase_folder",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_perm_parent_id"),
        "cmf_testcycle_testcase_folder",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_perm_security_level_id"),
        "cmf_testcycle_testcase_folder",
        ["perm_security_level_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_project_id"),
        "cmf_testcycle_testcase_folder",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_resolution_id"),
        "cmf_testcycle_testcase_folder",
        ["resolution_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_responsible_id"),
        "cmf_testcycle_testcase_folder",
        ["responsible_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_root_parent_id"),
        "cmf_testcycle_testcase_folder",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_scheme_wf_id"),
        "cmf_testcycle_testcase_folder",
        ["scheme_wf_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_status_id"),
        "cmf_testcycle_testcase_folder",
        ["status_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_test_configuration_id"),
        "cmf_testcycle_testcase_folder",
        ["test_configuration_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_tree_parent_folder_id"),
        "cmf_testcycle_testcase_folder",
        ["tree_parent_folder_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_tree_parent_id"),
        "cmf_testcycle_testcase_folder",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_waiting_for_id"),
        "cmf_testcycle_testcase_folder",
        ["waiting_for_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_workflow_id"),
        "cmf_testcycle_testcase_folder",
        ["workflow_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcycle_testcase_folder_cmf_owner_assistants",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_owner_assistants_left_id"),
        "cmf_testcycle_testcase_folder_cmf_owner_assistants",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f(
            "ix_cmf_testcycle_testcase_folder_cmf_owner_assistants_parent_id"
        ),
        "cmf_testcycle_testcase_folder_cmf_owner_assistants",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_owner_assistants_right_id"),
        "cmf_testcycle_testcase_folder_cmf_owner_assistants",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_owner_assistants_root_id"),
        "cmf_testcycle_testcase_folder_cmf_owner_assistants",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcycle_testcase_folder_executors",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_executors_left_id"),
        "cmf_testcycle_testcase_folder_executors",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_executors_parent_id"),
        "cmf_testcycle_testcase_folder_executors",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_executors_right_id"),
        "cmf_testcycle_testcase_folder_executors",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_executors_root_id"),
        "cmf_testcycle_testcase_folder_executors",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcycle_testcase_folder_local_links",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_local_links_left_id"),
        "cmf_testcycle_testcase_folder_local_links",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_local_links_parent_id"),
        "cmf_testcycle_testcase_folder_local_links",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_local_links_right_id"),
        "cmf_testcycle_testcase_folder_local_links",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_local_links_root_id"),
        "cmf_testcycle_testcase_folder_local_links",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcycle_testcase_folder_spectators",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_spectators_left_id"),
        "cmf_testcycle_testcase_folder_spectators",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_spectators_parent_id"),
        "cmf_testcycle_testcase_folder_spectators",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_spectators_right_id"),
        "cmf_testcycle_testcase_folder_spectators",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_folder_spectators_root_id"),
        "cmf_testcycle_testcase_folder_spectators",
        ["root_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_activity_id"),
        "cmf_testcycle_testcase_result",
        ["activity_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_alarm_date"),
        "cmf_testcycle_testcase_result",
        ["alarm_date"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_approved"),
        "cmf_testcycle_testcase_result",
        ["approved"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cache_status_opt_id"),
        "cmf_testcycle_testcase_result",
        ["cache_status_opt_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cache_status_type"),
        "cmf_testcycle_testcase_result",
        ["cache_status_type"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cloned_from_id"),
        "cmf_testcycle_testcase_result",
        ["cloned_from_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_author_id"),
        "cmf_testcycle_testcase_result",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_created_at"),
        "cmf_testcycle_testcase_result",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_deleted"),
        "cmf_testcycle_testcase_result",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_import_id"),
        "cmf_testcycle_testcase_result",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_locked_at"),
        "cmf_testcycle_testcase_result",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_locked_by_id"),
        "cmf_testcycle_testcase_result",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_modified_at"),
        "cmf_testcycle_testcase_result",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_modified_by_id"),
        "cmf_testcycle_testcase_result",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_owner_assistant_id"),
        "cmf_testcycle_testcase_result",
        ["cmf_owner_assistant_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_owner_id"),
        "cmf_testcycle_testcase_result",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_version"),
        "cmf_testcycle_testcase_result",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_viewed_at"),
        "cmf_testcycle_testcase_result",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_code"),
        "cmf_testcycle_testcase_result",
        ["code"],
        unique=True,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_company_id"),
        "cmf_testcycle_testcase_result",
        ["company_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_deadline"),
        "cmf_testcycle_testcase_result",
        ["deadline"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_default_task_workflow_id"),
        "cmf_testcycle_testcase_result",
        ["default_task_workflow_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_environment_id"),
        "cmf_testcycle_testcase_result",
        ["environment_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_is_template"),
        "cmf_testcycle_testcase_result",
        ["is_template"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_logic_prefix"),
        "cmf_testcycle_testcase_result",
        ["logic_prefix"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_logic_type_id"),
        "cmf_testcycle_testcase_result",
        ["logic_type_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_name"),
        "cmf_testcycle_testcase_result",
        ["name"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_orderno"),
        "cmf_testcycle_testcase_result",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_parent_id"),
        "cmf_testcycle_testcase_result",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_parent_logic_prefix"),
        "cmf_testcycle_testcase_result",
        ["parent_logic_prefix"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_perm_acl_id"),
        "cmf_testcycle_testcase_result",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_perm_parent_id"),
        "cmf_testcycle_testcase_result",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_perm_security_level_id"),
        "cmf_testcycle_testcase_result",
        ["perm_security_level_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_project_id"),
        "cmf_testcycle_testcase_result",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_resolution_id"),
        "cmf_testcycle_testcase_result",
        ["resolution_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_responsible_id"),
        "cmf_testcycle_testcase_result",
        ["responsible_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_root_parent_id"),
        "cmf_testcycle_testcase_result",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_scheme_wf_id"),
        "cmf_testcycle_testcase_result",
        ["scheme_wf_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_status_id"),
        "cmf_testcycle_testcase_result",
        ["status_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_test_configuration_id"),
        "cmf_testcycle_testcase_result",
        ["test_configuration_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_testcase_id"),
        "cmf_testcycle_testcase_result",
        ["testcase_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_testcycle_testcase_folder_id"),
        "cmf_testcycle_testcase_result",
        ["testcycle_testcase_folder_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_tree_parent_id"),
        "cmf_testcycle_testcase_result",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_waiting_for_id"),
        "cmf_testcycle_testcase_result",
        ["waiting_for_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_workflow_id"),
        "cmf_testcycle_testcase_result",
        ["workflow_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcycle_testcase_result_cmf_owner_assistants",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_owner_assistants_left_id"),
        "cmf_testcycle_testcase_result_cmf_owner_assistants",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f(
            "ix_cmf_testcycle_testcase_result_cmf_owner_assistants_parent_id"
        ),
        "cmf_testcycle_testcase_result_cmf_owner_assistants",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_owner_assistants_right_id"),
        "cmf_testcycle_testcase_result_cmf_owner_assistants",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_owner_assistants_root_id"),
        "cmf_testcycle_testcase_result_cmf_owner_assistants",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcycle_testcase_result_executors",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_executors_left_id"),
        "cmf_testcycle_testcase_result_executors",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_executors_parent_id"),
        "cmf_testcycle_testcase_result_executors",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_executors_right_id"),
        "cmf_testcycle_testcase_result_executors",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_executors_root_id"),
        "cmf_testcycle_testcase_result_executors",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcycle_testcase_result_local_links",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_local_links_left_id"),
        "cmf_testcycle_testcase_result_local_links",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_local_links_parent_id"),
        "cmf_testcycle_testcase_result_local_links",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_local_links_right_id"),
        "cmf_testcycle_testcase_result_local_links",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_local_links_root_id"),
        "cmf_testcycle_testcase_result_local_links",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testcycle_testcase_result_spectators",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_spectators_left_id"),
        "cmf_testcycle_testcase_result_spectators",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_spectators_parent_id"),
        "cmf_testcycle_testcase_result_spectators",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_spectators_right_id"),
        "cmf_testcycle_testcase_result_spectators",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testcycle_testcase_result_spectators_root_id"),
        "cmf_testcycle_testcase_result_spectators",
        ["root_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_activity_id"),
        "cmf_testplan",
        ["activity_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_alarm_date"),
        "cmf_testplan",
        ["alarm_date"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_approved"),
        "cmf_testplan",
        ["approved"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cache_status_opt_id"),
        "cmf_testplan",
        ["cache_status_opt_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cache_status_type"),
        "cmf_testplan",
        ["cache_status_type"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cloned_from_id"),
        "cmf_testplan",
        ["cloned_from_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cmf_author_id"),
        "cmf_testplan",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cmf_created_at"),
        "cmf_testplan",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cmf_deleted"),
        "cmf_testplan",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cmf_import_id"),
        "cmf_testplan",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cmf_locked_at"),
        "cmf_testplan",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cmf_locked_by_id"),
        "cmf_testplan",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cmf_modified_at"),
        "cmf_testplan",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cmf_modified_by_id"),
        "cmf_testplan",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cmf_owner_assistant_id"),
        "cmf_testplan",
        ["cmf_owner_assistant_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cmf_owner_id"),
        "cmf_testplan",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cmf_version"),
        "cmf_testplan",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cmf_viewed_at"),
        "cmf_testplan",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_code"), "cmf_testplan", ["code"], unique=True
    )
    op.create_index(
        op.f("ix_cmf_testplan_company_id"),
        "cmf_testplan",
        ["company_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_deadline"),
        "cmf_testplan",
        ["deadline"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_default_task_workflow_id"),
        "cmf_testplan",
        ["default_task_workflow_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_environment_id"),
        "cmf_testplan",
        ["environment_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_is_template"),
        "cmf_testplan",
        ["is_template"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_logic_prefix"),
        "cmf_testplan",
        ["logic_prefix"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_logic_type_id"),
        "cmf_testplan",
        ["logic_type_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_name"), "cmf_testplan", ["name"], unique=False
    )
    op.create_index(
        op.f("ix_cmf_testplan_orderno"),
        "cmf_testplan",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_parent_id"),
        "cmf_testplan",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_parent_logic_prefix"),
        "cmf_testplan",
        ["parent_logic_prefix"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_perm_acl_id"),
        "cmf_testplan",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_perm_parent_id"),
        "cmf_testplan",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_perm_security_level_id"),
        "cmf_testplan",
        ["perm_security_level_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_project_id"),
        "cmf_testplan",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_release_id"),
        "cmf_testplan",
        ["release_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_resolution_id"),
        "cmf_testplan",
        ["resolution_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_responsible_id"),
        "cmf_testplan",
        ["responsible_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_root_parent_id"),
        "cmf_testplan",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_scheme_wf_id"),
        "cmf_testplan",
        ["scheme_wf_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_status_id"),
        "cmf_testplan",
        ["status_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_tree_parent_id"),
        "cmf_testplan",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_waiting_for_id"),
        "cmf_testplan",
        ["waiting_for_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_workflow_id"),
        "cmf_testplan",
        ["workflow_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testplan_cmf_owner_assistants",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testplan_cmf_owner_assistants_left_id"),
        "cmf_testplan_cmf_owner_assistants",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cmf_owner_assistants_parent_id"),
        "cmf_testplan_cmf_owner_assistants",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cmf_owner_assistants_right_id"),
        "cmf_testplan_cmf_owner_assistants",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_cmf_owner_assistants_root_id"),
        "cmf_testplan_cmf_owner_assistants",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testplan_executors",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testplan_executors_left_id"),
        "cmf_testplan_executors",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_executors_parent_id"),
        "cmf_testplan_executors",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_executors_right_id"),
        "cmf_testplan_executors",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_executors_root_id"),
        "cmf_testplan_executors",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testplan_local_links",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testplan_local_links_left_id"),
        "cmf_testplan_local_links",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_local_links_parent_id"),
        "cmf_testplan_local_links",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_local_links_right_id"),
        "cmf_testplan_local_links",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_local_links_root_id"),
        "cmf_testplan_local_links",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testplan_spectators",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testplan_spectators_left_id"),
        "cmf_testplan_spectators",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_spectators_parent_id"),
        "cmf_testplan_spectators",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_spectators_right_id"),
        "cmf_testplan_spectators",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_spectators_root_id"),
        "cmf_testplan_spectators",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testplan_testcase_folder",
        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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), nullable=True),
        sa.Column("is_public", sa.Boolean(), nullable=False),
        sa.Column("is_public_editable", sa.Boolean(), nullable=False),
        sa.Column("is_public_comments", sa.Boolean(), nullable=False),
        sa.Column("has_children_archived", sa.Boolean(), nullable=False),
        sa.Column("logic_prefix", sa.String(), nullable=True),
        sa.Column("ui_view_form", sa.String(length=32), nullable=False),
        sa.Column("parent_logic_prefix", sa.String(), nullable=True),
        sa.Column("ui_view_form_options", sa.TEXT(), nullable=False),
        sa.Column(
            "status_modified_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column(
            "status_in_progress_start",
            sa.TIMESTAMP(timezone=True),
            nullable=True,
        ),
        sa.Column(
            "status_in_progress_end",
            sa.TIMESTAMP(timezone=True),
            nullable=True,
        ),
        sa.Column(
            "status_review_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column(
            "status_closed_at", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("no_control", sa.Boolean(), nullable=False),
        sa.Column("priority", sa.Integer(), nullable=False),
        sa.Column("mark", sa.String(length=32), nullable=True),
        sa.Column(
            "user_rating", sa.Numeric(precision=14, scale=2), nullable=True
        ),
        sa.Column("user_rating_count", sa.Integer(), nullable=False),
        sa.Column("alarm_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column("deadline", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column(
            "plan_start_date", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("plan_end_date", sa.TIMESTAMP(timezone=True), nullable=True),
        sa.Column(
            "period_next_date", sa.TIMESTAMP(timezone=True), nullable=True
        ),
        sa.Column("period_interval", sa.String(length=32), nullable=True),
        sa.Column("is_template", sa.Boolean(), nullable=False),
        sa.Column("is_penalty", sa.Boolean(), nullable=False),
        sa.Column("cache_status_type", sa.String(length=32), nullable=True),
        sa.Column("cache_fields", sa.TEXT(), nullable=True),
        sa.Column("approved", sa.Boolean(), nullable=False),
        sa.Column("perm_policy", sa.String(length=32), nullable=False),
        sa.Column("perm_policy_guest", sa.String(length=32), nullable=False),
        sa.Column(
            "perm_policy_anonymous", sa.String(length=32), nullable=False
        ),
        sa.Column(
            "perm_policy_sharelink", sa.String(length=32), nullable=False
        ),
        sa.Column("sharelink_hash", sa.String(length=32), nullable=True),
        sa.Column("sys_type", sa.String(length=32), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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("workflow_id", sa.String(length=64), nullable=True),
        sa.Column(
            "default_task_workflow_id", sa.String(length=64), nullable=True
        ),
        sa.Column("logic_type_id", sa.String(length=64), nullable=True),
        sa.Column("scheme_wf_id", sa.String(length=64), nullable=True),
        sa.Column(
            "cmf_owner_assistant_id", sa.String(length=64), nullable=True
        ),
        sa.Column(
            "perm_security_level_id", sa.String(length=64), nullable=True
        ),
        sa.Column("resolution_id", sa.String(length=64), nullable=True),
        sa.Column("status_id", sa.String(length=64), nullable=True),
        sa.Column("company_id", sa.String(length=64), nullable=True),
        sa.Column("responsible_id", sa.String(length=64), nullable=True),
        sa.Column("waiting_for_id", sa.String(length=64), nullable=True),
        sa.Column("cloned_from_id", sa.String(length=64), nullable=True),
        sa.Column("activity_id", sa.String(length=64), nullable=True),
        sa.Column("cache_status_opt_id", sa.String(length=64), nullable=True),
        sa.Column(
            "tree_parent_folder_id", sa.String(length=64), nullable=True
        ),
        sa.ForeignKeyConstraint(
            ["activity_id"],
            ["cmf_activity.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cache_status_opt_id"],
            ["cmf_status_opt.id"],
        ),
        sa.ForeignKeyConstraint(
            ["cmf_import_id"],
            ["cmf_import.id"],
        ),
        sa.ForeignKeyConstraint(
            ["company_id"],
            ["cmf_company.id"],
        ),
        sa.ForeignKeyConstraint(
            ["default_task_workflow_id"],
            ["cmf_workflow.id"],
        ),
        sa.ForeignKeyConstraint(
            ["logic_type_id"],
            ["cmf_logic_type.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_security_level_id"],
            ["cmf_security_level.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.ForeignKeyConstraint(
            ["resolution_id"],
            ["cmf_resolution.id"],
        ),
        sa.ForeignKeyConstraint(
            ["scheme_wf_id"],
            ["cmf_scheme_wf.id"],
        ),
        sa.ForeignKeyConstraint(
            ["status_id"],
            ["cmf_status.id"],
        ),
        sa.ForeignKeyConstraint(
            ["workflow_id"],
            ["cmf_workflow.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )

    op.create_table(
        "cmf_testplan_testcase",
        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("import_original", sa.Boolean(), nullable=False),
        sa.Column("import_raw_json", sa.TEXT(), nullable=True),
        sa.Column("ext_id", sa.String(), nullable=True),
        sa.Column("cmf_archived", sa.Boolean(), nullable=False),
        sa.Column("is_favorite", sa.Boolean(), nullable=False),
        sa.Column("has_tree_nodes", sa.Boolean(), nullable=False),
        sa.Column("tree_node_is_branch", sa.Boolean(), nullable=False),
        sa.Column("tree_hidden", sa.Boolean(), nullable=False),
        sa.Column("orderno", sa.Integer(), nullable=True),
        sa.Column("perm_public", sa.Boolean(), nullable=False),
        sa.Column("perm_has_acl", sa.Boolean(), nullable=False),
        sa.Column("perm_inherit", sa.Boolean(), nullable=False),
        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_security_level_allowed_ids_cache", sa.TEXT(), nullable=True
        ),
        sa.Column("perm_encrypt", sa.Boolean(), nullable=False),
        sa.Column("perm_encrypt_help", sa.String(length=256), 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("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("root_parent_id", sa.String(length=64), nullable=True),
        sa.Column("project_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(
            "testplan_testcase_folder_id", sa.String(length=64), nullable=True
        ),
        sa.Column("testcase_id", sa.String(length=64), nullable=True),
        sa.ForeignKeyConstraint(
            ["cmf_import_id"],
            ["cmf_import.id"],
        ),
        sa.ForeignKeyConstraint(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
        ),
        sa.ForeignKeyConstraint(
            ["testcase_id"],
            ["cmf_testcase.id"],
        ),
        sa.ForeignKeyConstraint(
            ["testplan_testcase_folder_id"],
            ["cmf_testplan_testcase_folder.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_cmf_author_id"),
        "cmf_testplan_testcase",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_cmf_created_at"),
        "cmf_testplan_testcase",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_cmf_deleted"),
        "cmf_testplan_testcase",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_cmf_import_id"),
        "cmf_testplan_testcase",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_cmf_locked_at"),
        "cmf_testplan_testcase",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_cmf_locked_by_id"),
        "cmf_testplan_testcase",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_cmf_modified_at"),
        "cmf_testplan_testcase",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_cmf_modified_by_id"),
        "cmf_testplan_testcase",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_cmf_owner_id"),
        "cmf_testplan_testcase",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_cmf_version"),
        "cmf_testplan_testcase",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_cmf_viewed_at"),
        "cmf_testplan_testcase",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_code"),
        "cmf_testplan_testcase",
        ["code"],
        unique=True,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_name"),
        "cmf_testplan_testcase",
        ["name"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_orderno"),
        "cmf_testplan_testcase",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_parent_id"),
        "cmf_testplan_testcase",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_perm_acl_id"),
        "cmf_testplan_testcase",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_perm_parent_id"),
        "cmf_testplan_testcase",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_project_id"),
        "cmf_testplan_testcase",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_root_parent_id"),
        "cmf_testplan_testcase",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_testcase_id"),
        "cmf_testplan_testcase",
        ["testcase_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_testplan_testcase_folder_id"),
        "cmf_testplan_testcase",
        ["testplan_testcase_folder_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_tree_parent_id"),
        "cmf_testplan_testcase",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_activity_id"),
        "cmf_testplan_testcase_folder",
        ["activity_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_alarm_date"),
        "cmf_testplan_testcase_folder",
        ["alarm_date"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_approved"),
        "cmf_testplan_testcase_folder",
        ["approved"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cache_status_opt_id"),
        "cmf_testplan_testcase_folder",
        ["cache_status_opt_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cache_status_type"),
        "cmf_testplan_testcase_folder",
        ["cache_status_type"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cloned_from_id"),
        "cmf_testplan_testcase_folder",
        ["cloned_from_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_author_id"),
        "cmf_testplan_testcase_folder",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_created_at"),
        "cmf_testplan_testcase_folder",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_deleted"),
        "cmf_testplan_testcase_folder",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_import_id"),
        "cmf_testplan_testcase_folder",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_locked_at"),
        "cmf_testplan_testcase_folder",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_locked_by_id"),
        "cmf_testplan_testcase_folder",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_modified_at"),
        "cmf_testplan_testcase_folder",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_modified_by_id"),
        "cmf_testplan_testcase_folder",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_owner_assistant_id"),
        "cmf_testplan_testcase_folder",
        ["cmf_owner_assistant_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_owner_id"),
        "cmf_testplan_testcase_folder",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_version"),
        "cmf_testplan_testcase_folder",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_viewed_at"),
        "cmf_testplan_testcase_folder",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_code"),
        "cmf_testplan_testcase_folder",
        ["code"],
        unique=True,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_company_id"),
        "cmf_testplan_testcase_folder",
        ["company_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_deadline"),
        "cmf_testplan_testcase_folder",
        ["deadline"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_default_task_workflow_id"),
        "cmf_testplan_testcase_folder",
        ["default_task_workflow_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_is_template"),
        "cmf_testplan_testcase_folder",
        ["is_template"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_logic_prefix"),
        "cmf_testplan_testcase_folder",
        ["logic_prefix"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_logic_type_id"),
        "cmf_testplan_testcase_folder",
        ["logic_type_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_name"),
        "cmf_testplan_testcase_folder",
        ["name"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_orderno"),
        "cmf_testplan_testcase_folder",
        ["orderno"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_parent_id"),
        "cmf_testplan_testcase_folder",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_parent_logic_prefix"),
        "cmf_testplan_testcase_folder",
        ["parent_logic_prefix"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_perm_acl_id"),
        "cmf_testplan_testcase_folder",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_perm_parent_id"),
        "cmf_testplan_testcase_folder",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_perm_security_level_id"),
        "cmf_testplan_testcase_folder",
        ["perm_security_level_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_project_id"),
        "cmf_testplan_testcase_folder",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_resolution_id"),
        "cmf_testplan_testcase_folder",
        ["resolution_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_responsible_id"),
        "cmf_testplan_testcase_folder",
        ["responsible_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_root_parent_id"),
        "cmf_testplan_testcase_folder",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_scheme_wf_id"),
        "cmf_testplan_testcase_folder",
        ["scheme_wf_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_status_id"),
        "cmf_testplan_testcase_folder",
        ["status_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_tree_parent_folder_id"),
        "cmf_testplan_testcase_folder",
        ["tree_parent_folder_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_tree_parent_id"),
        "cmf_testplan_testcase_folder",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_waiting_for_id"),
        "cmf_testplan_testcase_folder",
        ["waiting_for_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_workflow_id"),
        "cmf_testplan_testcase_folder",
        ["workflow_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testplan_testcase_folder_cmf_owner_assistants",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_owner_assistants_left_id"),
        "cmf_testplan_testcase_folder_cmf_owner_assistants",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_owner_assistants_parent_id"),
        "cmf_testplan_testcase_folder_cmf_owner_assistants",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_owner_assistants_right_id"),
        "cmf_testplan_testcase_folder_cmf_owner_assistants",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_owner_assistants_root_id"),
        "cmf_testplan_testcase_folder_cmf_owner_assistants",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testplan_testcase_folder_executors",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_executors_left_id"),
        "cmf_testplan_testcase_folder_executors",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_executors_parent_id"),
        "cmf_testplan_testcase_folder_executors",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_executors_right_id"),
        "cmf_testplan_testcase_folder_executors",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_executors_root_id"),
        "cmf_testplan_testcase_folder_executors",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testplan_testcase_folder_local_links",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_local_links_left_id"),
        "cmf_testplan_testcase_folder_local_links",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_local_links_parent_id"),
        "cmf_testplan_testcase_folder_local_links",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_local_links_right_id"),
        "cmf_testplan_testcase_folder_local_links",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_local_links_root_id"),
        "cmf_testplan_testcase_folder_local_links",
        ["root_id"],
        unique=False,
    )
    op.create_table(
        "cmf_testplan_testcase_folder_spectators",
        sa.Column("id", sa.String(length=128), nullable=False),
        sa.Column("parent_id", sa.String(length=64), nullable=True),
        sa.Column("root_id", sa.String(length=64), nullable=True),
        sa.Column("description", sa.String(length=4096), nullable=True),
        sa.Column("left_id", sa.String(length=64), nullable=True),
        sa.Column("right_id", sa.String(length=64), nullable=True),
        sa.Column("left_name_cache", sa.String(length=256), nullable=True),
        sa.Column("right_name_cache", sa.String(length=256), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_spectators_left_id"),
        "cmf_testplan_testcase_folder_spectators",
        ["left_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_spectators_parent_id"),
        "cmf_testplan_testcase_folder_spectators",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_spectators_right_id"),
        "cmf_testplan_testcase_folder_spectators",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        op.f("ix_cmf_testplan_testcase_folder_spectators_root_id"),
        "cmf_testplan_testcase_folder_spectators",
        ["root_id"],
        unique=False,
    )
    op.drop_index("ix_cmf_test_case_activity_id", table_name="cmf_test_case")
    op.drop_index("ix_cmf_test_case_alarm_date", table_name="cmf_test_case")
    op.drop_index("ix_cmf_test_case_approved", table_name="cmf_test_case")
    op.drop_index(
        "ix_cmf_test_case_cache_status_opt_id", table_name="cmf_test_case"
    )
    op.drop_index(
        "ix_cmf_test_case_cache_status_type", table_name="cmf_test_case"
    )
    op.drop_index(
        "ix_cmf_test_case_cloned_from_id", table_name="cmf_test_case"
    )
    op.drop_index("ix_cmf_test_case_cmf_author_id", table_name="cmf_test_case")
    op.drop_index(
        "ix_cmf_test_case_cmf_created_at", table_name="cmf_test_case"
    )
    op.drop_index("ix_cmf_test_case_cmf_deleted", table_name="cmf_test_case")
    op.drop_index("ix_cmf_test_case_cmf_import_id", table_name="cmf_test_case")
    op.drop_index("ix_cmf_test_case_cmf_locked_at", table_name="cmf_test_case")
    op.drop_index(
        "ix_cmf_test_case_cmf_locked_by_id", table_name="cmf_test_case"
    )
    op.drop_index(
        "ix_cmf_test_case_cmf_modified_at", table_name="cmf_test_case"
    )
    op.drop_index(
        "ix_cmf_test_case_cmf_modified_by_id", table_name="cmf_test_case"
    )
    op.drop_index(
        "ix_cmf_test_case_cmf_owner_assistant_id", table_name="cmf_test_case"
    )
    op.drop_index("ix_cmf_test_case_cmf_owner_id", table_name="cmf_test_case")
    op.drop_index(
        "ix_cmf_test_case_cmf_ver_head2cur_id", table_name="cmf_test_case"
    )
    op.drop_index(
        "ix_cmf_test_case_cmf_ver_head_id", table_name="cmf_test_case"
    )
    op.drop_index("ix_cmf_test_case_cmf_version", table_name="cmf_test_case")
    op.drop_index("ix_cmf_test_case_cmf_viewed_at", table_name="cmf_test_case")
    op.drop_index("ix_cmf_test_case_code", table_name="cmf_test_case")
    op.drop_index("ix_cmf_test_case_company_id", table_name="cmf_test_case")
    op.drop_index("ix_cmf_test_case_deadline", table_name="cmf_test_case")
    op.drop_index(
        "ix_cmf_test_case_default_task_workflow_id", table_name="cmf_test_case"
    )
    op.drop_index("ix_cmf_test_case_is_template", table_name="cmf_test_case")
    op.drop_index("ix_cmf_test_case_logic_prefix", table_name="cmf_test_case")
    op.drop_index("ix_cmf_test_case_logic_type_id", table_name="cmf_test_case")
    op.drop_index("ix_cmf_test_case_name", table_name="cmf_test_case")
    op.drop_index("ix_cmf_test_case_orderno", table_name="cmf_test_case")
    op.drop_index("ix_cmf_test_case_parent_id", table_name="cmf_test_case")
    op.drop_index(
        "ix_cmf_test_case_parent_logic_prefix", table_name="cmf_test_case"
    )
    op.drop_index("ix_cmf_test_case_perm_acl_id", table_name="cmf_test_case")
    op.drop_index(
        "ix_cmf_test_case_perm_parent_id", table_name="cmf_test_case"
    )
    op.drop_index(
        "ix_cmf_test_case_perm_security_level_id", table_name="cmf_test_case"
    )
    op.drop_index("ix_cmf_test_case_project_id", table_name="cmf_test_case")
    op.drop_index("ix_cmf_test_case_resolution_id", table_name="cmf_test_case")
    op.drop_index(
        "ix_cmf_test_case_responsible_id", table_name="cmf_test_case"
    )
    op.drop_index(
        "ix_cmf_test_case_root_parent_id", table_name="cmf_test_case"
    )
    op.drop_index("ix_cmf_test_case_scheme_wf_id", table_name="cmf_test_case")
    op.drop_index("ix_cmf_test_case_status_id", table_name="cmf_test_case")
    op.drop_index(
        "ix_cmf_test_case_tree_parent_id", table_name="cmf_test_case"
    )
    op.drop_index(
        "ix_cmf_test_case_waiting_for_id", table_name="cmf_test_case"
    )
    op.drop_index("ix_cmf_test_case_workflow_id", table_name="cmf_test_case")
    op.drop_table("cmf_test_case")
    op.drop_index(
        "ix_cmf_test_case_spectators_left_id",
        table_name="cmf_test_case_spectators",
    )
    op.drop_index(
        "ix_cmf_test_case_spectators_parent_id",
        table_name="cmf_test_case_spectators",
    )
    op.drop_index(
        "ix_cmf_test_case_spectators_right_id",
        table_name="cmf_test_case_spectators",
    )
    op.drop_index(
        "ix_cmf_test_case_spectators_root_id",
        table_name="cmf_test_case_spectators",
    )
    op.drop_table("cmf_test_case_spectators")
    op.drop_index(
        "ix_cmf_test_case_cmf_owner_assistants_left_id",
        table_name="cmf_test_case_cmf_owner_assistants",
    )
    op.drop_index(
        "ix_cmf_test_case_cmf_owner_assistants_parent_id",
        table_name="cmf_test_case_cmf_owner_assistants",
    )
    op.drop_index(
        "ix_cmf_test_case_cmf_owner_assistants_right_id",
        table_name="cmf_test_case_cmf_owner_assistants",
    )
    op.drop_index(
        "ix_cmf_test_case_cmf_owner_assistants_root_id",
        table_name="cmf_test_case_cmf_owner_assistants",
    )
    op.drop_table("cmf_test_case_cmf_owner_assistants")
    op.drop_index(
        "ix_cmf_test_case_local_links_left_id",
        table_name="cmf_test_case_local_links",
    )
    op.drop_index(
        "ix_cmf_test_case_local_links_parent_id",
        table_name="cmf_test_case_local_links",
    )
    op.drop_index(
        "ix_cmf_test_case_local_links_right_id",
        table_name="cmf_test_case_local_links",
    )
    op.drop_index(
        "ix_cmf_test_case_local_links_root_id",
        table_name="cmf_test_case_local_links",
    )
    op.drop_table("cmf_test_case_local_links")
    op.drop_index(
        "ix_cmf_test_case_executors_left_id",
        table_name="cmf_test_case_executors",
    )
    op.drop_index(
        "ix_cmf_test_case_executors_parent_id",
        table_name="cmf_test_case_executors",
    )
    op.drop_index(
        "ix_cmf_test_case_executors_right_id",
        table_name="cmf_test_case_executors",
    )
    op.drop_index(
        "ix_cmf_test_case_executors_root_id",
        table_name="cmf_test_case_executors",
    )
    op.drop_table("cmf_test_case_executors")
    op.add_column(
        "cmf_project",
        sa.Column(
            "show_tests", sa.Boolean(), nullable=False, server_default="false"
        ),
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("cmf_project", "show_tests")
    op.create_table(
        "cmf_test_case_executors",
        sa.Column(
            "id", sa.VARCHAR(length=128), autoincrement=False, nullable=False
        ),
        sa.Column(
            "parent_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "root_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "description",
            sa.VARCHAR(length=4096),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "left_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "right_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "left_name_cache",
            sa.VARCHAR(length=256),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "right_name_cache",
            sa.VARCHAR(length=256),
            autoincrement=False,
            nullable=True,
        ),
        sa.PrimaryKeyConstraint("id", name="cmf_test_case_executors_pkey"),
    )
    op.create_index(
        "ix_cmf_test_case_executors_root_id",
        "cmf_test_case_executors",
        ["root_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_executors_right_id",
        "cmf_test_case_executors",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_executors_parent_id",
        "cmf_test_case_executors",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_executors_left_id",
        "cmf_test_case_executors",
        ["left_id"],
        unique=False,
    )
    op.create_table(
        "cmf_test_case_local_links",
        sa.Column(
            "id", sa.VARCHAR(length=128), autoincrement=False, nullable=False
        ),
        sa.Column(
            "parent_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "root_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "description",
            sa.VARCHAR(length=4096),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "left_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "right_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "left_name_cache",
            sa.VARCHAR(length=256),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "right_name_cache",
            sa.VARCHAR(length=256),
            autoincrement=False,
            nullable=True,
        ),
        sa.PrimaryKeyConstraint("id", name="cmf_test_case_local_links_pkey"),
    )
    op.create_index(
        "ix_cmf_test_case_local_links_root_id",
        "cmf_test_case_local_links",
        ["root_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_local_links_right_id",
        "cmf_test_case_local_links",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_local_links_parent_id",
        "cmf_test_case_local_links",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_local_links_left_id",
        "cmf_test_case_local_links",
        ["left_id"],
        unique=False,
    )
    op.create_table(
        "cmf_test_case_cmf_owner_assistants",
        sa.Column(
            "id", sa.VARCHAR(length=128), autoincrement=False, nullable=False
        ),
        sa.Column(
            "parent_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "root_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "description",
            sa.VARCHAR(length=4096),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "left_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "right_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "left_name_cache",
            sa.VARCHAR(length=256),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "right_name_cache",
            sa.VARCHAR(length=256),
            autoincrement=False,
            nullable=True,
        ),
        sa.PrimaryKeyConstraint(
            "id", name="cmf_test_case_cmf_owner_assistants_pkey"
        ),
    )
    op.create_index(
        "ix_cmf_test_case_cmf_owner_assistants_root_id",
        "cmf_test_case_cmf_owner_assistants",
        ["root_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cmf_owner_assistants_right_id",
        "cmf_test_case_cmf_owner_assistants",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cmf_owner_assistants_parent_id",
        "cmf_test_case_cmf_owner_assistants",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cmf_owner_assistants_left_id",
        "cmf_test_case_cmf_owner_assistants",
        ["left_id"],
        unique=False,
    )
    op.create_table(
        "cmf_test_case_spectators",
        sa.Column(
            "id", sa.VARCHAR(length=128), autoincrement=False, nullable=False
        ),
        sa.Column(
            "parent_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "root_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "description",
            sa.VARCHAR(length=4096),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "left_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "right_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "left_name_cache",
            sa.VARCHAR(length=256),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "right_name_cache",
            sa.VARCHAR(length=256),
            autoincrement=False,
            nullable=True,
        ),
        sa.PrimaryKeyConstraint("id", name="cmf_test_case_spectators_pkey"),
    )
    op.create_index(
        "ix_cmf_test_case_spectators_root_id",
        "cmf_test_case_spectators",
        ["root_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_spectators_right_id",
        "cmf_test_case_spectators",
        ["right_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_spectators_parent_id",
        "cmf_test_case_spectators",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_spectators_left_id",
        "cmf_test_case_spectators",
        ["left_id"],
        unique=False,
    )
    op.create_table(
        "cmf_test_case",
        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(
            "import_original",
            sa.BOOLEAN(),
            autoincrement=False,
            nullable=False,
        ),
        sa.Column(
            "import_raw_json", sa.TEXT(), autoincrement=False, nullable=True
        ),
        sa.Column("ext_id", sa.VARCHAR(), autoincrement=False, nullable=True),
        sa.Column(
            "cmf_archived", sa.BOOLEAN(), autoincrement=False, nullable=False
        ),
        sa.Column(
            "is_favorite", sa.BOOLEAN(), autoincrement=False, nullable=False
        ),
        sa.Column(
            "has_tree_nodes", sa.BOOLEAN(), autoincrement=False, nullable=False
        ),
        sa.Column(
            "tree_node_is_branch",
            sa.BOOLEAN(),
            autoincrement=False,
            nullable=False,
        ),
        sa.Column(
            "tree_hidden", sa.BOOLEAN(), autoincrement=False, nullable=False
        ),
        sa.Column("orderno", sa.INTEGER(), autoincrement=False, nullable=True),
        sa.Column(
            "perm_public", sa.BOOLEAN(), autoincrement=False, nullable=False
        ),
        sa.Column(
            "perm_has_acl", sa.BOOLEAN(), autoincrement=False, nullable=False
        ),
        sa.Column(
            "perm_inherit", sa.BOOLEAN(), autoincrement=False, nullable=False
        ),
        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_security_level_allowed_ids_cache",
            sa.TEXT(),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "perm_encrypt", sa.BOOLEAN(), autoincrement=False, nullable=False
        ),
        sa.Column(
            "is_public", sa.BOOLEAN(), autoincrement=False, nullable=False
        ),
        sa.Column(
            "is_public_editable",
            sa.BOOLEAN(),
            autoincrement=False,
            nullable=False,
        ),
        sa.Column(
            "is_public_comments",
            sa.BOOLEAN(),
            autoincrement=False,
            nullable=False,
        ),
        sa.Column(
            "has_children_archived",
            sa.BOOLEAN(),
            autoincrement=False,
            nullable=False,
        ),
        sa.Column(
            "logic_prefix", sa.VARCHAR(), autoincrement=False, nullable=True
        ),
        sa.Column(
            "ui_view_form",
            sa.VARCHAR(length=32),
            autoincrement=False,
            nullable=False,
        ),
        sa.Column(
            "parent_logic_prefix",
            sa.VARCHAR(),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "ui_view_form_options",
            sa.TEXT(),
            autoincrement=False,
            nullable=False,
        ),
        sa.Column(
            "status_modified_at",
            postgresql.TIMESTAMP(timezone=True),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "status_in_progress_start",
            postgresql.TIMESTAMP(timezone=True),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "status_in_progress_end",
            postgresql.TIMESTAMP(timezone=True),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "status_review_at",
            postgresql.TIMESTAMP(timezone=True),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "status_closed_at",
            postgresql.TIMESTAMP(timezone=True),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "no_control", sa.BOOLEAN(), autoincrement=False, nullable=False
        ),
        sa.Column(
            "priority", sa.INTEGER(), autoincrement=False, nullable=False
        ),
        sa.Column(
            "mark", sa.VARCHAR(length=32), autoincrement=False, nullable=True
        ),
        sa.Column(
            "user_rating",
            sa.NUMERIC(precision=14, scale=2),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "user_rating_count",
            sa.INTEGER(),
            autoincrement=False,
            nullable=False,
        ),
        sa.Column(
            "alarm_date",
            postgresql.TIMESTAMP(timezone=True),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "deadline",
            postgresql.TIMESTAMP(timezone=True),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "plan_start_date",
            postgresql.TIMESTAMP(timezone=True),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "plan_end_date",
            postgresql.TIMESTAMP(timezone=True),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "period_next_date",
            postgresql.TIMESTAMP(timezone=True),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "period_interval",
            sa.VARCHAR(length=32),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "is_template", sa.BOOLEAN(), autoincrement=False, nullable=False
        ),
        sa.Column(
            "is_penalty", sa.BOOLEAN(), autoincrement=False, nullable=False
        ),
        sa.Column(
            "cache_status_type",
            sa.VARCHAR(length=32),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "cache_fields", sa.TEXT(), autoincrement=False, nullable=True
        ),
        sa.Column(
            "approved", sa.BOOLEAN(), autoincrement=False, nullable=False
        ),
        sa.Column(
            "perm_policy",
            sa.VARCHAR(length=32),
            autoincrement=False,
            nullable=False,
        ),
        sa.Column(
            "perm_policy_guest",
            sa.VARCHAR(length=32),
            autoincrement=False,
            nullable=False,
        ),
        sa.Column(
            "perm_policy_anonymous",
            sa.VARCHAR(length=32),
            autoincrement=False,
            nullable=False,
        ),
        sa.Column(
            "perm_policy_sharelink",
            sa.VARCHAR(length=32),
            autoincrement=False,
            nullable=False,
        ),
        sa.Column(
            "sharelink_hash",
            sa.VARCHAR(length=32),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "cmf_ver_number", sa.INTEGER(), autoincrement=False, nullable=True
        ),
        sa.Column(
            "cmf_ver_cur", sa.BOOLEAN(), autoincrement=False, nullable=False
        ),
        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(
            "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(
            "root_parent_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "project_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(
            "workflow_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "default_task_workflow_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "logic_type_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "scheme_wf_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(
            "perm_security_level_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "resolution_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "status_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "company_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "responsible_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "waiting_for_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "cloned_from_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "activity_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "cache_status_opt_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "cmf_ver_head_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "cmf_ver_head2cur_id",
            sa.VARCHAR(length=64),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "perm_encrypt_help",
            sa.VARCHAR(length=256),
            autoincrement=False,
            nullable=True,
        ),
        sa.ForeignKeyConstraint(
            ["activity_id"],
            ["cmf_activity.id"],
            name="cmf_test_case_activity_id_fkey",
        ),
        sa.ForeignKeyConstraint(
            ["cache_status_opt_id"],
            ["cmf_status_opt.id"],
            name="cmf_test_case_cache_status_opt_id_fkey",
        ),
        sa.ForeignKeyConstraint(
            ["cmf_import_id"],
            ["cmf_import.id"],
            name="cmf_test_case_cmf_import_id_fkey",
        ),
        sa.ForeignKeyConstraint(
            ["cmf_ver_head2cur_id"],
            ["cmf_test_case.id"],
            name="cmf_test_case_cmf_ver_head2cur_id_fkey",
        ),
        sa.ForeignKeyConstraint(
            ["cmf_ver_head_id"],
            ["cmf_test_case.id"],
            name="cmf_test_case_cmf_ver_head_id_fkey",
        ),
        sa.ForeignKeyConstraint(
            ["company_id"],
            ["cmf_company.id"],
            name="cmf_test_case_company_id_fkey",
        ),
        sa.ForeignKeyConstraint(
            ["default_task_workflow_id"],
            ["cmf_workflow.id"],
            name="cmf_test_case_default_task_workflow_id_fkey",
        ),
        sa.ForeignKeyConstraint(
            ["logic_type_id"],
            ["cmf_logic_type.id"],
            name="cmf_test_case_logic_type_id_fkey",
        ),
        sa.ForeignKeyConstraint(
            ["perm_acl_id"],
            ["cmf_access_list.id"],
            name="cmf_test_case_perm_acl_id_fkey",
        ),
        sa.ForeignKeyConstraint(
            ["perm_security_level_id"],
            ["cmf_security_level.id"],
            name="cmf_test_case_perm_security_level_id_fkey",
        ),
        sa.ForeignKeyConstraint(
            ["project_id"],
            ["cmf_project.id"],
            name="cmf_test_case_project_id_fkey",
        ),
        sa.ForeignKeyConstraint(
            ["resolution_id"],
            ["cmf_resolution.id"],
            name="cmf_test_case_resolution_id_fkey",
        ),
        sa.ForeignKeyConstraint(
            ["scheme_wf_id"],
            ["cmf_scheme_wf.id"],
            name="cmf_test_case_scheme_wf_id_fkey",
        ),
        sa.ForeignKeyConstraint(
            ["status_id"],
            ["cmf_status.id"],
            name="cmf_test_case_status_id_fkey",
        ),
        sa.ForeignKeyConstraint(
            ["workflow_id"],
            ["cmf_workflow.id"],
            name="cmf_test_case_workflow_id_fkey",
        ),
        sa.PrimaryKeyConstraint("id", name="cmf_test_case_pkey"),
    )
    op.create_index(
        "ix_cmf_test_case_workflow_id",
        "cmf_test_case",
        ["workflow_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_waiting_for_id",
        "cmf_test_case",
        ["waiting_for_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_tree_parent_id",
        "cmf_test_case",
        ["tree_parent_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_status_id",
        "cmf_test_case",
        ["status_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_scheme_wf_id",
        "cmf_test_case",
        ["scheme_wf_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_root_parent_id",
        "cmf_test_case",
        ["root_parent_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_responsible_id",
        "cmf_test_case",
        ["responsible_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_resolution_id",
        "cmf_test_case",
        ["resolution_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_project_id",
        "cmf_test_case",
        ["project_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_perm_security_level_id",
        "cmf_test_case",
        ["perm_security_level_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_perm_parent_id",
        "cmf_test_case",
        ["perm_parent_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_perm_acl_id",
        "cmf_test_case",
        ["perm_acl_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_parent_logic_prefix",
        "cmf_test_case",
        ["parent_logic_prefix"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_parent_id",
        "cmf_test_case",
        ["parent_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_orderno", "cmf_test_case", ["orderno"], unique=False
    )
    op.create_index(
        "ix_cmf_test_case_name", "cmf_test_case", ["name"], unique=False
    )
    op.create_index(
        "ix_cmf_test_case_logic_type_id",
        "cmf_test_case",
        ["logic_type_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_logic_prefix",
        "cmf_test_case",
        ["logic_prefix"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_is_template",
        "cmf_test_case",
        ["is_template"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_default_task_workflow_id",
        "cmf_test_case",
        ["default_task_workflow_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_deadline",
        "cmf_test_case",
        ["deadline"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_company_id",
        "cmf_test_case",
        ["company_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_code", "cmf_test_case", ["code"], unique=False
    )
    op.create_index(
        "ix_cmf_test_case_cmf_viewed_at",
        "cmf_test_case",
        ["cmf_viewed_at"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cmf_version",
        "cmf_test_case",
        ["cmf_version"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cmf_ver_head_id",
        "cmf_test_case",
        ["cmf_ver_head_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cmf_ver_head2cur_id",
        "cmf_test_case",
        ["cmf_ver_head2cur_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cmf_owner_id",
        "cmf_test_case",
        ["cmf_owner_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cmf_owner_assistant_id",
        "cmf_test_case",
        ["cmf_owner_assistant_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cmf_modified_by_id",
        "cmf_test_case",
        ["cmf_modified_by_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cmf_modified_at",
        "cmf_test_case",
        ["cmf_modified_at"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cmf_locked_by_id",
        "cmf_test_case",
        ["cmf_locked_by_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cmf_locked_at",
        "cmf_test_case",
        ["cmf_locked_at"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cmf_import_id",
        "cmf_test_case",
        ["cmf_import_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cmf_deleted",
        "cmf_test_case",
        ["cmf_deleted"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cmf_created_at",
        "cmf_test_case",
        ["cmf_created_at"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cmf_author_id",
        "cmf_test_case",
        ["cmf_author_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cloned_from_id",
        "cmf_test_case",
        ["cloned_from_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cache_status_type",
        "cmf_test_case",
        ["cache_status_type"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_cache_status_opt_id",
        "cmf_test_case",
        ["cache_status_opt_id"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_approved",
        "cmf_test_case",
        ["approved"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_alarm_date",
        "cmf_test_case",
        ["alarm_date"],
        unique=False,
    )
    op.create_index(
        "ix_cmf_test_case_activity_id",
        "cmf_test_case",
        ["activity_id"],
        unique=False,
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_spectators_root_id"),
        table_name="cmf_testplan_testcase_folder_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_spectators_right_id"),
        table_name="cmf_testplan_testcase_folder_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_spectators_parent_id"),
        table_name="cmf_testplan_testcase_folder_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_spectators_left_id"),
        table_name="cmf_testplan_testcase_folder_spectators",
    )
    op.drop_table("cmf_testplan_testcase_folder_spectators")
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_local_links_root_id"),
        table_name="cmf_testplan_testcase_folder_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_local_links_right_id"),
        table_name="cmf_testplan_testcase_folder_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_local_links_parent_id"),
        table_name="cmf_testplan_testcase_folder_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_local_links_left_id"),
        table_name="cmf_testplan_testcase_folder_local_links",
    )
    op.drop_table("cmf_testplan_testcase_folder_local_links")
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_executors_root_id"),
        table_name="cmf_testplan_testcase_folder_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_executors_right_id"),
        table_name="cmf_testplan_testcase_folder_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_executors_parent_id"),
        table_name="cmf_testplan_testcase_folder_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_executors_left_id"),
        table_name="cmf_testplan_testcase_folder_executors",
    )
    op.drop_table("cmf_testplan_testcase_folder_executors")
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_owner_assistants_root_id"),
        table_name="cmf_testplan_testcase_folder_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_owner_assistants_right_id"),
        table_name="cmf_testplan_testcase_folder_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_owner_assistants_parent_id"),
        table_name="cmf_testplan_testcase_folder_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_owner_assistants_left_id"),
        table_name="cmf_testplan_testcase_folder_cmf_owner_assistants",
    )
    op.drop_table("cmf_testplan_testcase_folder_cmf_owner_assistants")
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_workflow_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_waiting_for_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_tree_parent_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_tree_parent_folder_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_status_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_scheme_wf_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_root_parent_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_responsible_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_resolution_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_project_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_perm_security_level_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_perm_parent_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_perm_acl_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_parent_logic_prefix"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_parent_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_orderno"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_name"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_logic_type_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_logic_prefix"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_is_template"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_default_task_workflow_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_deadline"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_company_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_code"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_viewed_at"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_version"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_owner_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_owner_assistant_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_modified_by_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_modified_at"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_locked_by_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_locked_at"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_import_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_deleted"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_created_at"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cmf_author_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cloned_from_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cache_status_type"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_cache_status_opt_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_approved"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_alarm_date"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_folder_activity_id"),
        table_name="cmf_testplan_testcase_folder",
    )
    op.drop_table("cmf_testplan_testcase_folder")
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_tree_parent_id"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_testplan_testcase_folder_id"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_testcase_id"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_root_parent_id"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_project_id"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_perm_parent_id"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_perm_acl_id"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_parent_id"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_orderno"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_name"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_code"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_cmf_viewed_at"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_cmf_version"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_cmf_owner_id"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_cmf_modified_by_id"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_cmf_modified_at"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_cmf_locked_by_id"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_cmf_locked_at"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_cmf_import_id"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_cmf_deleted"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_cmf_created_at"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_testcase_cmf_author_id"),
        table_name="cmf_testplan_testcase",
    )
    op.drop_table("cmf_testplan_testcase")
    op.drop_index(
        op.f("ix_cmf_testplan_spectators_root_id"),
        table_name="cmf_testplan_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_spectators_right_id"),
        table_name="cmf_testplan_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_spectators_parent_id"),
        table_name="cmf_testplan_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_spectators_left_id"),
        table_name="cmf_testplan_spectators",
    )
    op.drop_table("cmf_testplan_spectators")
    op.drop_index(
        op.f("ix_cmf_testplan_local_links_root_id"),
        table_name="cmf_testplan_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_local_links_right_id"),
        table_name="cmf_testplan_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_local_links_parent_id"),
        table_name="cmf_testplan_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_local_links_left_id"),
        table_name="cmf_testplan_local_links",
    )
    op.drop_table("cmf_testplan_local_links")
    op.drop_index(
        op.f("ix_cmf_testplan_executors_root_id"),
        table_name="cmf_testplan_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_executors_right_id"),
        table_name="cmf_testplan_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_executors_parent_id"),
        table_name="cmf_testplan_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_executors_left_id"),
        table_name="cmf_testplan_executors",
    )
    op.drop_table("cmf_testplan_executors")
    op.drop_index(
        op.f("ix_cmf_testplan_cmf_owner_assistants_root_id"),
        table_name="cmf_testplan_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cmf_owner_assistants_right_id"),
        table_name="cmf_testplan_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cmf_owner_assistants_parent_id"),
        table_name="cmf_testplan_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cmf_owner_assistants_left_id"),
        table_name="cmf_testplan_cmf_owner_assistants",
    )
    op.drop_table("cmf_testplan_cmf_owner_assistants")
    op.drop_index(
        op.f("ix_cmf_testplan_workflow_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_waiting_for_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_tree_parent_id"), table_name="cmf_testplan"
    )
    op.drop_index(op.f("ix_cmf_testplan_status_id"), table_name="cmf_testplan")
    op.drop_index(
        op.f("ix_cmf_testplan_scheme_wf_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_root_parent_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_responsible_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_resolution_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_release_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_project_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_perm_security_level_id"),
        table_name="cmf_testplan",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_perm_parent_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_perm_acl_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_parent_logic_prefix"), table_name="cmf_testplan"
    )
    op.drop_index(op.f("ix_cmf_testplan_parent_id"), table_name="cmf_testplan")
    op.drop_index(op.f("ix_cmf_testplan_orderno"), table_name="cmf_testplan")
    op.drop_index(op.f("ix_cmf_testplan_name"), table_name="cmf_testplan")
    op.drop_index(
        op.f("ix_cmf_testplan_logic_type_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_logic_prefix"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_is_template"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_environment_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_default_task_workflow_id"),
        table_name="cmf_testplan",
    )
    op.drop_index(op.f("ix_cmf_testplan_deadline"), table_name="cmf_testplan")
    op.drop_index(
        op.f("ix_cmf_testplan_company_id"), table_name="cmf_testplan"
    )
    op.drop_index(op.f("ix_cmf_testplan_code"), table_name="cmf_testplan")
    op.drop_index(
        op.f("ix_cmf_testplan_cmf_viewed_at"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cmf_version"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cmf_owner_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cmf_owner_assistant_id"),
        table_name="cmf_testplan",
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cmf_modified_by_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cmf_modified_at"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cmf_locked_by_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cmf_locked_at"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cmf_import_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cmf_deleted"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cmf_created_at"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cmf_author_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cloned_from_id"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cache_status_type"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_cache_status_opt_id"), table_name="cmf_testplan"
    )
    op.drop_index(op.f("ix_cmf_testplan_approved"), table_name="cmf_testplan")
    op.drop_index(
        op.f("ix_cmf_testplan_alarm_date"), table_name="cmf_testplan"
    )
    op.drop_index(
        op.f("ix_cmf_testplan_activity_id"), table_name="cmf_testplan"
    )
    op.drop_table("cmf_testplan")
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_spectators_root_id"),
        table_name="cmf_testcycle_testcase_result_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_spectators_right_id"),
        table_name="cmf_testcycle_testcase_result_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_spectators_parent_id"),
        table_name="cmf_testcycle_testcase_result_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_spectators_left_id"),
        table_name="cmf_testcycle_testcase_result_spectators",
    )
    op.drop_table("cmf_testcycle_testcase_result_spectators")
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_local_links_root_id"),
        table_name="cmf_testcycle_testcase_result_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_local_links_right_id"),
        table_name="cmf_testcycle_testcase_result_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_local_links_parent_id"),
        table_name="cmf_testcycle_testcase_result_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_local_links_left_id"),
        table_name="cmf_testcycle_testcase_result_local_links",
    )
    op.drop_table("cmf_testcycle_testcase_result_local_links")
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_executors_root_id"),
        table_name="cmf_testcycle_testcase_result_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_executors_right_id"),
        table_name="cmf_testcycle_testcase_result_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_executors_parent_id"),
        table_name="cmf_testcycle_testcase_result_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_executors_left_id"),
        table_name="cmf_testcycle_testcase_result_executors",
    )
    op.drop_table("cmf_testcycle_testcase_result_executors")
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_owner_assistants_root_id"),
        table_name="cmf_testcycle_testcase_result_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_owner_assistants_right_id"),
        table_name="cmf_testcycle_testcase_result_cmf_owner_assistants",
    )
    op.drop_index(
        op.f(
            "ix_cmf_testcycle_testcase_result_cmf_owner_assistants_parent_id"
        ),
        table_name="cmf_testcycle_testcase_result_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_owner_assistants_left_id"),
        table_name="cmf_testcycle_testcase_result_cmf_owner_assistants",
    )
    op.drop_table("cmf_testcycle_testcase_result_cmf_owner_assistants")
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_workflow_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_waiting_for_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_tree_parent_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_testcycle_testcase_folder_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_testcase_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_test_configuration_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_status_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_scheme_wf_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_root_parent_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_responsible_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_resolution_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_project_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_perm_security_level_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_perm_parent_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_perm_acl_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_parent_logic_prefix"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_parent_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_orderno"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_name"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_logic_type_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_logic_prefix"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_is_template"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_environment_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_default_task_workflow_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_deadline"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_company_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_code"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_viewed_at"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_version"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_owner_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_owner_assistant_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_modified_by_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_modified_at"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_locked_by_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_locked_at"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_import_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_deleted"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_created_at"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cmf_author_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cloned_from_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cache_status_type"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_cache_status_opt_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_approved"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_alarm_date"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_result_activity_id"),
        table_name="cmf_testcycle_testcase_result",
    )
    op.drop_table("cmf_testcycle_testcase_result")
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_spectators_root_id"),
        table_name="cmf_testcycle_testcase_folder_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_spectators_right_id"),
        table_name="cmf_testcycle_testcase_folder_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_spectators_parent_id"),
        table_name="cmf_testcycle_testcase_folder_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_spectators_left_id"),
        table_name="cmf_testcycle_testcase_folder_spectators",
    )
    op.drop_table("cmf_testcycle_testcase_folder_spectators")
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_local_links_root_id"),
        table_name="cmf_testcycle_testcase_folder_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_local_links_right_id"),
        table_name="cmf_testcycle_testcase_folder_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_local_links_parent_id"),
        table_name="cmf_testcycle_testcase_folder_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_local_links_left_id"),
        table_name="cmf_testcycle_testcase_folder_local_links",
    )
    op.drop_table("cmf_testcycle_testcase_folder_local_links")
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_executors_root_id"),
        table_name="cmf_testcycle_testcase_folder_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_executors_right_id"),
        table_name="cmf_testcycle_testcase_folder_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_executors_parent_id"),
        table_name="cmf_testcycle_testcase_folder_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_executors_left_id"),
        table_name="cmf_testcycle_testcase_folder_executors",
    )
    op.drop_table("cmf_testcycle_testcase_folder_executors")
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_owner_assistants_root_id"),
        table_name="cmf_testcycle_testcase_folder_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_owner_assistants_right_id"),
        table_name="cmf_testcycle_testcase_folder_cmf_owner_assistants",
    )
    op.drop_index(
        op.f(
            "ix_cmf_testcycle_testcase_folder_cmf_owner_assistants_parent_id"
        ),
        table_name="cmf_testcycle_testcase_folder_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_owner_assistants_left_id"),
        table_name="cmf_testcycle_testcase_folder_cmf_owner_assistants",
    )
    op.drop_table("cmf_testcycle_testcase_folder_cmf_owner_assistants")
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_workflow_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_waiting_for_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_tree_parent_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_tree_parent_folder_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_test_configuration_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_status_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_scheme_wf_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_root_parent_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_responsible_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_resolution_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_project_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_perm_security_level_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_perm_parent_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_perm_acl_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_parent_logic_prefix"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_parent_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_orderno"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_name"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_logic_type_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_logic_prefix"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_is_template"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_environment_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_default_task_workflow_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_deadline"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_company_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_code"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_viewed_at"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_version"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_owner_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_owner_assistant_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_modified_by_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_modified_at"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_locked_by_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_locked_at"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_import_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_deleted"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_created_at"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cmf_author_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cloned_from_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cache_status_type"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_cache_status_opt_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_approved"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_alarm_date"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testcase_folder_activity_id"),
        table_name="cmf_testcycle_testcase_folder",
    )
    op.drop_table("cmf_testcycle_testcase_folder")
    op.drop_index(
        op.f("ix_cmf_testcycle_spectators_root_id"),
        table_name="cmf_testcycle_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_spectators_right_id"),
        table_name="cmf_testcycle_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_spectators_parent_id"),
        table_name="cmf_testcycle_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_spectators_left_id"),
        table_name="cmf_testcycle_spectators",
    )
    op.drop_table("cmf_testcycle_spectators")
    op.drop_index(
        op.f("ix_cmf_testcycle_local_links_root_id"),
        table_name="cmf_testcycle_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_local_links_right_id"),
        table_name="cmf_testcycle_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_local_links_parent_id"),
        table_name="cmf_testcycle_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_local_links_left_id"),
        table_name="cmf_testcycle_local_links",
    )
    op.drop_table("cmf_testcycle_local_links")
    op.drop_index(
        op.f("ix_cmf_testcycle_executors_root_id"),
        table_name="cmf_testcycle_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_executors_right_id"),
        table_name="cmf_testcycle_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_executors_parent_id"),
        table_name="cmf_testcycle_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_executors_left_id"),
        table_name="cmf_testcycle_executors",
    )
    op.drop_table("cmf_testcycle_executors")
    op.drop_index(
        op.f("ix_cmf_testcycle_cmf_owner_assistants_root_id"),
        table_name="cmf_testcycle_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cmf_owner_assistants_right_id"),
        table_name="cmf_testcycle_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cmf_owner_assistants_parent_id"),
        table_name="cmf_testcycle_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cmf_owner_assistants_left_id"),
        table_name="cmf_testcycle_cmf_owner_assistants",
    )
    op.drop_table("cmf_testcycle_cmf_owner_assistants")
    op.drop_index(
        op.f("ix_cmf_testcycle_workflow_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_waiting_for_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_tree_parent_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_testplan_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_test_configuration_id"),
        table_name="cmf_testcycle",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_status_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_scheme_wf_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_root_parent_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_responsible_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_release_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_project_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_perm_security_level_id"),
        table_name="cmf_testcycle",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_perm_parent_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_perm_acl_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_parent_logic_prefix"),
        table_name="cmf_testcycle",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_parent_id"), table_name="cmf_testcycle"
    )
    op.drop_index(op.f("ix_cmf_testcycle_orderno"), table_name="cmf_testcycle")
    op.drop_index(op.f("ix_cmf_testcycle_name"), table_name="cmf_testcycle")
    op.drop_index(
        op.f("ix_cmf_testcycle_logic_type_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_logic_prefix"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_is_template"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_environment_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_default_task_workflow_id"),
        table_name="cmf_testcycle",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_default_responsible_id"),
        table_name="cmf_testcycle",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_deadline"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_company_id"), table_name="cmf_testcycle"
    )
    op.drop_index(op.f("ix_cmf_testcycle_code"), table_name="cmf_testcycle")
    op.drop_index(
        op.f("ix_cmf_testcycle_cmf_viewed_at"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cmf_version"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cmf_owner_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cmf_owner_assistant_id"),
        table_name="cmf_testcycle",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cmf_modified_by_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cmf_modified_at"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cmf_locked_by_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cmf_locked_at"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cmf_import_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cmf_deleted"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cmf_created_at"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cmf_author_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cloned_from_id"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cache_status_type"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_cache_status_opt_id"),
        table_name="cmf_testcycle",
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_approved"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_alarm_date"), table_name="cmf_testcycle"
    )
    op.drop_index(
        op.f("ix_cmf_testcycle_activity_id"), table_name="cmf_testcycle"
    )
    op.drop_table("cmf_testcycle")
    op.drop_index(
        op.f("ix_cmf_testcase_step_tree_parent_id"),
        table_name="cmf_testcase_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_testcase_template_id"),
        table_name="cmf_testcase_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_root_parent_id"),
        table_name="cmf_testcase_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_project_id"), table_name="cmf_testcase_step"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_perm_parent_id"),
        table_name="cmf_testcase_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_perm_acl_id"),
        table_name="cmf_testcase_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_parent_id"), table_name="cmf_testcase_step"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_orderno"), table_name="cmf_testcase_step"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_name"), table_name="cmf_testcase_step"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_code"), table_name="cmf_testcase_step"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_cmf_viewed_at"),
        table_name="cmf_testcase_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_cmf_version"),
        table_name="cmf_testcase_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_cmf_owner_id"),
        table_name="cmf_testcase_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_cmf_modified_by_id"),
        table_name="cmf_testcase_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_cmf_modified_at"),
        table_name="cmf_testcase_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_cmf_locked_by_id"),
        table_name="cmf_testcase_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_cmf_locked_at"),
        table_name="cmf_testcase_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_cmf_import_id"),
        table_name="cmf_testcase_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_cmf_deleted"),
        table_name="cmf_testcase_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_cmf_created_at"),
        table_name="cmf_testcase_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_step_cmf_author_id"),
        table_name="cmf_testcase_step",
    )
    op.drop_table("cmf_testcase_step")
    op.drop_index(
        op.f("ix_cmf_testcase_spectators_root_id"),
        table_name="cmf_testcase_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_spectators_right_id"),
        table_name="cmf_testcase_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_spectators_parent_id"),
        table_name="cmf_testcase_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_spectators_left_id"),
        table_name="cmf_testcase_spectators",
    )
    op.drop_table("cmf_testcase_spectators")
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_tree_parent_id"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_testcase_step_id"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_testcase_id"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_root_parent_id"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_project_id"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_perm_parent_id"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_perm_acl_id"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_parent_id"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_orderno"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_name"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_code"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_cmf_viewed_at"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_cmf_version"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_cmf_owner_id"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_cmf_modified_by_id"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_cmf_modified_at"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_cmf_locked_by_id"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_cmf_locked_at"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_cmf_import_id"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_cmf_deleted"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_cmf_created_at"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_step_cmf_author_id"),
        table_name="cmf_testcase_run_step",
    )
    op.drop_table("cmf_testcase_run_step")
    op.drop_index(
        op.f("ix_cmf_testcase_run_spectators_root_id"),
        table_name="cmf_testcase_run_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_spectators_right_id"),
        table_name="cmf_testcase_run_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_spectators_parent_id"),
        table_name="cmf_testcase_run_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_spectators_left_id"),
        table_name="cmf_testcase_run_spectators",
    )
    op.drop_table("cmf_testcase_run_spectators")
    op.drop_index(
        op.f("ix_cmf_testcase_run_local_links_root_id"),
        table_name="cmf_testcase_run_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_local_links_right_id"),
        table_name="cmf_testcase_run_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_local_links_parent_id"),
        table_name="cmf_testcase_run_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_local_links_left_id"),
        table_name="cmf_testcase_run_local_links",
    )
    op.drop_table("cmf_testcase_run_local_links")
    op.drop_index(
        op.f("ix_cmf_testcase_run_executors_root_id"),
        table_name="cmf_testcase_run_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_executors_right_id"),
        table_name="cmf_testcase_run_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_executors_parent_id"),
        table_name="cmf_testcase_run_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_executors_left_id"),
        table_name="cmf_testcase_run_executors",
    )
    op.drop_table("cmf_testcase_run_executors")
    op.drop_index(
        op.f("ix_cmf_testcase_run_cmf_owner_assistants_root_id"),
        table_name="cmf_testcase_run_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cmf_owner_assistants_right_id"),
        table_name="cmf_testcase_run_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cmf_owner_assistants_parent_id"),
        table_name="cmf_testcase_run_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cmf_owner_assistants_left_id"),
        table_name="cmf_testcase_run_cmf_owner_assistants",
    )
    op.drop_table("cmf_testcase_run_cmf_owner_assistants")
    op.drop_index(
        op.f("ix_cmf_testcase_run_workflow_id"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_waiting_for_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_tree_parent_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_testcycle_testcase_result_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_testcycle_testcase_folder_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_testcase_id"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_test_configuration_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_status_id"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_scheme_wf_id"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_root_parent_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_responsible_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_resolution_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_release_id"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_project_id"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_perm_security_level_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_perm_parent_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_perm_acl_id"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_parent_logic_prefix"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_parent_id"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_orderno"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_name"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_logic_type_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_logic_prefix"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_is_template"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_default_task_workflow_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_deadline"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_company_id"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_code"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cmf_viewed_at"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cmf_version"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cmf_owner_id"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cmf_owner_assistant_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cmf_modified_by_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cmf_modified_at"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cmf_locked_by_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cmf_locked_at"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cmf_import_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cmf_deleted"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cmf_created_at"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cmf_author_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cloned_from_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cache_status_type"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_cache_status_opt_id"),
        table_name="cmf_testcase_run",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_approved"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_alarm_date"), table_name="cmf_testcase_run"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_run_activity_id"), table_name="cmf_testcase_run"
    )
    op.drop_table("cmf_testcase_run")
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_tree_parent_id"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_root_parent_id"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_project_id"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_perm_parent_id"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_perm_acl_id"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_parent_id"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_orderno"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_name"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_code"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_cmf_viewed_at"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_cmf_version"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_cmf_owner_id"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_cmf_modified_by_id"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_cmf_modified_at"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_cmf_locked_by_id"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_cmf_locked_at"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_cmf_import_id"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_cmf_deleted"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_cmf_created_at"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_params_row_cmf_author_id"),
        table_name="cmf_testcase_params_row",
    )
    op.drop_table("cmf_testcase_params_row")
    op.drop_index(
        op.f("ix_cmf_testcase_param_tree_parent_id"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_testcase_id"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_root_parent_id"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_project_id"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_perm_parent_id"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_perm_acl_id"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_parent_id"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_param_value_id"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_param_id"), table_name="cmf_testcase_param"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_orderno"), table_name="cmf_testcase_param"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_name"), table_name="cmf_testcase_param"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_code"), table_name="cmf_testcase_param"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_cmf_viewed_at"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_cmf_version"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_cmf_owner_id"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_cmf_modified_by_id"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_cmf_modified_at"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_cmf_locked_by_id"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_cmf_locked_at"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_cmf_import_id"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_cmf_deleted"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_cmf_created_at"),
        table_name="cmf_testcase_param",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_param_cmf_author_id"),
        table_name="cmf_testcase_param",
    )
    op.drop_table("cmf_testcase_param")
    op.drop_index(
        op.f("ix_cmf_testcase_local_links_root_id"),
        table_name="cmf_testcase_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_local_links_right_id"),
        table_name="cmf_testcase_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_local_links_parent_id"),
        table_name="cmf_testcase_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_local_links_left_id"),
        table_name="cmf_testcase_local_links",
    )
    op.drop_table("cmf_testcase_local_links")
    op.drop_index(
        op.f("ix_cmf_testcase_folder_spectators_root_id"),
        table_name="cmf_testcase_folder_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_spectators_right_id"),
        table_name="cmf_testcase_folder_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_spectators_parent_id"),
        table_name="cmf_testcase_folder_spectators",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_spectators_left_id"),
        table_name="cmf_testcase_folder_spectators",
    )
    op.drop_table("cmf_testcase_folder_spectators")
    op.drop_index(
        op.f("ix_cmf_testcase_folder_local_links_root_id"),
        table_name="cmf_testcase_folder_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_local_links_right_id"),
        table_name="cmf_testcase_folder_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_local_links_parent_id"),
        table_name="cmf_testcase_folder_local_links",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_local_links_left_id"),
        table_name="cmf_testcase_folder_local_links",
    )
    op.drop_table("cmf_testcase_folder_local_links")
    op.drop_index(
        op.f("ix_cmf_testcase_folder_executors_root_id"),
        table_name="cmf_testcase_folder_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_executors_right_id"),
        table_name="cmf_testcase_folder_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_executors_parent_id"),
        table_name="cmf_testcase_folder_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_executors_left_id"),
        table_name="cmf_testcase_folder_executors",
    )
    op.drop_table("cmf_testcase_folder_executors")
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cmf_owner_assistants_root_id"),
        table_name="cmf_testcase_folder_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cmf_owner_assistants_right_id"),
        table_name="cmf_testcase_folder_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cmf_owner_assistants_parent_id"),
        table_name="cmf_testcase_folder_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cmf_owner_assistants_left_id"),
        table_name="cmf_testcase_folder_cmf_owner_assistants",
    )
    op.drop_table("cmf_testcase_folder_cmf_owner_assistants")
    op.drop_index(
        op.f("ix_cmf_testcase_folder_workflow_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_waiting_for_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_tree_parent_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_status_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_scheme_wf_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_root_parent_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_responsible_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_resolution_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_project_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_perm_security_level_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_perm_parent_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_perm_acl_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_parent_logic_prefix"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_parent_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_orderno"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_name"), table_name="cmf_testcase_folder"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_logic_type_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_logic_prefix"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_is_template"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_default_task_workflow_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_deadline"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_company_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_code"), table_name="cmf_testcase_folder"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cmf_viewed_at"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cmf_version"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cmf_owner_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cmf_owner_assistant_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cmf_modified_by_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cmf_modified_at"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cmf_locked_by_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cmf_locked_at"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cmf_import_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cmf_deleted"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cmf_created_at"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cmf_author_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cloned_from_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cache_status_type"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_cache_status_opt_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_approved"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_alarm_date"),
        table_name="cmf_testcase_folder",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_folder_activity_id"),
        table_name="cmf_testcase_folder",
    )
    op.drop_table("cmf_testcase_folder")
    op.drop_index(
        op.f("ix_cmf_testcase_executors_root_id"),
        table_name="cmf_testcase_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_executors_right_id"),
        table_name="cmf_testcase_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_executors_parent_id"),
        table_name="cmf_testcase_executors",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_executors_left_id"),
        table_name="cmf_testcase_executors",
    )
    op.drop_table("cmf_testcase_executors")
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_owner_assistants_root_id"),
        table_name="cmf_testcase_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_owner_assistants_right_id"),
        table_name="cmf_testcase_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_owner_assistants_parent_id"),
        table_name="cmf_testcase_cmf_owner_assistants",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_owner_assistants_left_id"),
        table_name="cmf_testcase_cmf_owner_assistants",
    )
    op.drop_table("cmf_testcase_cmf_owner_assistants")
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_component_root_id"),
        table_name="cmf_testcase_cmf_component",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_component_right_id"),
        table_name="cmf_testcase_cmf_component",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_component_parent_id"),
        table_name="cmf_testcase_cmf_component",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_component_left_id"),
        table_name="cmf_testcase_cmf_component",
    )
    op.drop_table("cmf_testcase_cmf_component")
    op.drop_index(
        op.f("ix_cmf_testcase_workflow_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_waiting_for_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_tree_parent_id"), table_name="cmf_testcase"
    )
    op.drop_index(op.f("ix_cmf_testcase_status_id"), table_name="cmf_testcase")
    op.drop_index(
        op.f("ix_cmf_testcase_scheme_wf_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_root_parent_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_responsible_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_resolution_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_project_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_perm_security_level_id"),
        table_name="cmf_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_perm_parent_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_perm_acl_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_parent_logic_prefix"), table_name="cmf_testcase"
    )
    op.drop_index(op.f("ix_cmf_testcase_parent_id"), table_name="cmf_testcase")
    op.drop_index(op.f("ix_cmf_testcase_orderno"), table_name="cmf_testcase")
    op.drop_index(op.f("ix_cmf_testcase_name"), table_name="cmf_testcase")
    op.drop_index(
        op.f("ix_cmf_testcase_logic_type_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_logic_prefix"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_is_template"), table_name="cmf_testcase"
    )
    op.drop_index(op.f("ix_cmf_testcase_folder_id"), table_name="cmf_testcase")
    op.drop_index(
        op.f("ix_cmf_testcase_default_task_workflow_id"),
        table_name="cmf_testcase",
    )
    op.drop_index(op.f("ix_cmf_testcase_deadline"), table_name="cmf_testcase")
    op.drop_index(
        op.f("ix_cmf_testcase_company_id"), table_name="cmf_testcase"
    )
    op.drop_index(op.f("ix_cmf_testcase_code"), table_name="cmf_testcase")
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_viewed_at"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_version"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_ver_head_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_ver_head2cur_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_owner_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_owner_assistant_id"),
        table_name="cmf_testcase",
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_modified_by_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_modified_at"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_locked_by_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_locked_at"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_import_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_deleted"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_created_at"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cmf_author_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cloned_from_id"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cache_status_type"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_cache_status_opt_id"), table_name="cmf_testcase"
    )
    op.drop_index(op.f("ix_cmf_testcase_approved"), table_name="cmf_testcase")
    op.drop_index(
        op.f("ix_cmf_testcase_alarm_date"), table_name="cmf_testcase"
    )
    op.drop_index(
        op.f("ix_cmf_testcase_activity_id"), table_name="cmf_testcase"
    )
    op.drop_table("cmf_testcase")
    op.drop_index(
        op.f("ix_cmf_test_param_value_tree_parent_id"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_root_parent_id"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_project_id"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_perm_parent_id"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_perm_acl_id"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_parent_id"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_orderno"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_code"), table_name="cmf_test_param_value"
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_cmf_viewed_at"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_cmf_version"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_cmf_owner_id"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_cmf_modified_by_id"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_cmf_modified_at"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_cmf_locked_by_id"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_cmf_locked_at"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_cmf_import_id"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_cmf_deleted"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_cmf_created_at"),
        table_name="cmf_test_param_value",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_value_cmf_author_id"),
        table_name="cmf_test_param_value",
    )
    op.drop_table("cmf_test_param_value")
    op.drop_index(
        op.f("ix_cmf_test_param_tree_parent_id"), table_name="cmf_test_param"
    )
    op.drop_index(
        op.f("ix_cmf_test_param_root_parent_id"), table_name="cmf_test_param"
    )
    op.drop_index(
        op.f("ix_cmf_test_param_project_id"), table_name="cmf_test_param"
    )
    op.drop_index(
        op.f("ix_cmf_test_param_perm_parent_id"), table_name="cmf_test_param"
    )
    op.drop_index(
        op.f("ix_cmf_test_param_perm_acl_id"), table_name="cmf_test_param"
    )
    op.drop_index(
        op.f("ix_cmf_test_param_parent_id"), table_name="cmf_test_param"
    )
    op.drop_index(
        op.f("ix_cmf_test_param_orderno"), table_name="cmf_test_param"
    )
    op.drop_index(op.f("ix_cmf_test_param_name"), table_name="cmf_test_param")
    op.drop_index(op.f("ix_cmf_test_param_code"), table_name="cmf_test_param")
    op.drop_index(
        op.f("ix_cmf_test_param_cmf_viewed_at"), table_name="cmf_test_param"
    )
    op.drop_index(
        op.f("ix_cmf_test_param_cmf_version"), table_name="cmf_test_param"
    )
    op.drop_index(
        op.f("ix_cmf_test_param_cmf_owner_id"), table_name="cmf_test_param"
    )
    op.drop_index(
        op.f("ix_cmf_test_param_cmf_modified_by_id"),
        table_name="cmf_test_param",
    )
    op.drop_index(
        op.f("ix_cmf_test_param_cmf_modified_at"), table_name="cmf_test_param"
    )
    op.drop_index(
        op.f("ix_cmf_test_param_cmf_locked_by_id"), table_name="cmf_test_param"
    )
    op.drop_index(
        op.f("ix_cmf_test_param_cmf_locked_at"), table_name="cmf_test_param"
    )
    op.drop_index(
        op.f("ix_cmf_test_param_cmf_import_id"), table_name="cmf_test_param"
    )
    op.drop_index(
        op.f("ix_cmf_test_param_cmf_deleted"), table_name="cmf_test_param"
    )
    op.drop_index(
        op.f("ix_cmf_test_param_cmf_created_at"), table_name="cmf_test_param"
    )
    op.drop_index(
        op.f("ix_cmf_test_param_cmf_author_id"), table_name="cmf_test_param"
    )
    op.drop_table("cmf_test_param")
    op.drop_index(
        op.f("ix_cmf_test_environment_tree_parent_id"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_root_parent_id"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_project_id"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_perm_parent_id"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_perm_acl_id"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_parent_id"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_orderno"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_name"), table_name="cmf_test_environment"
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_code"), table_name="cmf_test_environment"
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_cmf_viewed_at"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_cmf_version"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_cmf_owner_id"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_cmf_modified_by_id"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_cmf_modified_at"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_cmf_locked_by_id"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_cmf_locked_at"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_cmf_import_id"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_cmf_deleted"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_cmf_created_at"),
        table_name="cmf_test_environment",
    )
    op.drop_index(
        op.f("ix_cmf_test_environment_cmf_author_id"),
        table_name="cmf_test_environment",
    )
    op.drop_table("cmf_test_environment")
    op.drop_index(
        op.f("ix_cmf_test_configuration_tree_parent_id"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_root_parent_id"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_project_id"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_perm_parent_id"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_perm_acl_id"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_parent_id"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_orderno"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_name"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_code"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_cmf_viewed_at"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_cmf_version"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_cmf_owner_id"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_cmf_modified_by_id"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_cmf_modified_at"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_cmf_locked_by_id"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_cmf_locked_at"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_cmf_import_id"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_cmf_deleted"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_cmf_created_at"),
        table_name="cmf_test_configuration",
    )
    op.drop_index(
        op.f("ix_cmf_test_configuration_cmf_author_id"),
        table_name="cmf_test_configuration",
    )
    op.drop_table("cmf_test_configuration")
    # ### end Alembic commands ###
