"""empty message

Revision ID: 53e9a273e4fa
Revises: fef965688b0f
Create Date: 2020-10-06 10:52:45.913329

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '53e9a273e4fa'
down_revision = 'fef965688b0f'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('cmf_document_executors', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_document_executors_root_id'), 'cmf_document_executors', ['root_id'], unique=False)
    op.add_column('cmf_document_related_objects', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_document_related_objects_root_id'), 'cmf_document_related_objects', ['root_id'], unique=False)
    op.add_column('cmf_document_spectators', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_document_spectators_root_id'), 'cmf_document_spectators', ['root_id'], unique=False)
    op.add_column('cmf_kanban_status_objects', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_kanban_status_objects_root_id'), 'cmf_kanban_status_objects', ['root_id'], unique=False)
    op.add_column('cmf_person_group_rg_members', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_person_group_rg_members_root_id'), 'cmf_person_group_rg_members', ['root_id'], unique=False)
    op.add_column('cmf_project_executors', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_project_executors_root_id'), 'cmf_project_executors', ['root_id'], unique=False)
    op.add_column('cmf_project_spectators', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_project_spectators_root_id'), 'cmf_project_spectators', ['root_id'], unique=False)
    op.add_column('cmf_u_work_chat_group_executors', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_chat_group_executors_root_id'), 'cmf_u_work_chat_group_executors', ['root_id'], unique=False)
    op.add_column('cmf_u_work_chat_group_related_objects', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_chat_group_related_objects_root_id'), 'cmf_u_work_chat_group_related_objects', ['root_id'], unique=False)
    op.add_column('cmf_u_work_chat_group_spectators', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_chat_group_spectators_root_id'), 'cmf_u_work_chat_group_spectators', ['root_id'], unique=False)
    op.add_column('cmf_u_work_chat_topic_executors', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_chat_topic_executors_root_id'), 'cmf_u_work_chat_topic_executors', ['root_id'], unique=False)
    op.add_column('cmf_u_work_chat_topic_related_objects', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_chat_topic_related_objects_root_id'), 'cmf_u_work_chat_topic_related_objects', ['root_id'], unique=False)
    op.add_column('cmf_u_work_chat_topic_spectators', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_chat_topic_spectators_root_id'), 'cmf_u_work_chat_topic_spectators', ['root_id'], unique=False)
    op.add_column('cmf_u_work_list_executors', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_list_executors_root_id'), 'cmf_u_work_list_executors', ['root_id'], unique=False)
    op.add_column('cmf_u_work_list_members', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_list_members_root_id'), 'cmf_u_work_list_members', ['root_id'], unique=False)
    op.add_column('cmf_u_work_list_related_objects', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_list_related_objects_root_id'), 'cmf_u_work_list_related_objects', ['root_id'], unique=False)
    op.add_column('cmf_u_work_list_spectators', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_list_spectators_root_id'), 'cmf_u_work_list_spectators', ['root_id'], unique=False)
    op.add_column('cmf_u_work_post_executors', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_post_executors_root_id'), 'cmf_u_work_post_executors', ['root_id'], unique=False)
    op.add_column('cmf_u_work_post_related_objects', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_post_related_objects_root_id'), 'cmf_u_work_post_related_objects', ['root_id'], unique=False)
    op.add_column('cmf_u_work_post_spectators', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_post_spectators_root_id'), 'cmf_u_work_post_spectators', ['root_id'], unique=False)
    op.add_column('cmf_u_work_task_executors', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_task_executors_root_id'), 'cmf_u_work_task_executors', ['root_id'], unique=False)
    op.add_column('cmf_u_work_task_related_objects', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_task_related_objects_root_id'), 'cmf_u_work_task_related_objects', ['root_id'], unique=False)
    op.add_column('cmf_u_work_task_spectators', sa.Column('root_id', sa.CHAR(length=64), nullable=True))
    op.create_index(op.f('ix_cmf_u_work_task_spectators_root_id'), 'cmf_u_work_task_spectators', ['root_id'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_cmf_u_work_task_spectators_root_id'), table_name='cmf_u_work_task_spectators')
    op.drop_column('cmf_u_work_task_spectators', 'root_id')
    op.drop_index(op.f('ix_cmf_u_work_task_related_objects_root_id'), table_name='cmf_u_work_task_related_objects')
    op.drop_column('cmf_u_work_task_related_objects', 'root_id')
    op.drop_index(op.f('ix_cmf_u_work_task_executors_root_id'), table_name='cmf_u_work_task_executors')
    op.drop_column('cmf_u_work_task_executors', 'root_id')
    op.drop_index(op.f('ix_cmf_u_work_post_spectators_root_id'), table_name='cmf_u_work_post_spectators')
    op.drop_column('cmf_u_work_post_spectators', 'root_id')
    op.drop_index(op.f('ix_cmf_u_work_post_related_objects_root_id'), table_name='cmf_u_work_post_related_objects')
    op.drop_column('cmf_u_work_post_related_objects', 'root_id')
    op.drop_index(op.f('ix_cmf_u_work_post_executors_root_id'), table_name='cmf_u_work_post_executors')
    op.drop_column('cmf_u_work_post_executors', 'root_id')
    op.drop_index(op.f('ix_cmf_u_work_list_spectators_root_id'), table_name='cmf_u_work_list_spectators')
    op.drop_column('cmf_u_work_list_spectators', 'root_id')
    op.drop_index(op.f('ix_cmf_u_work_list_related_objects_root_id'), table_name='cmf_u_work_list_related_objects')
    op.drop_column('cmf_u_work_list_related_objects', 'root_id')
    op.drop_index(op.f('ix_cmf_u_work_list_members_root_id'), table_name='cmf_u_work_list_members')
    op.drop_column('cmf_u_work_list_members', 'root_id')
    op.drop_index(op.f('ix_cmf_u_work_list_executors_root_id'), table_name='cmf_u_work_list_executors')
    op.drop_column('cmf_u_work_list_executors', 'root_id')
    op.drop_index(op.f('ix_cmf_u_work_chat_topic_spectators_root_id'), table_name='cmf_u_work_chat_topic_spectators')
    op.drop_column('cmf_u_work_chat_topic_spectators', 'root_id')
    op.drop_index(op.f('ix_cmf_u_work_chat_topic_related_objects_root_id'), table_name='cmf_u_work_chat_topic_related_objects')
    op.drop_column('cmf_u_work_chat_topic_related_objects', 'root_id')
    op.drop_index(op.f('ix_cmf_u_work_chat_topic_executors_root_id'), table_name='cmf_u_work_chat_topic_executors')
    op.drop_column('cmf_u_work_chat_topic_executors', 'root_id')
    op.drop_index(op.f('ix_cmf_u_work_chat_group_spectators_root_id'), table_name='cmf_u_work_chat_group_spectators')
    op.drop_column('cmf_u_work_chat_group_spectators', 'root_id')
    op.drop_index(op.f('ix_cmf_u_work_chat_group_related_objects_root_id'), table_name='cmf_u_work_chat_group_related_objects')
    op.drop_column('cmf_u_work_chat_group_related_objects', 'root_id')
    op.drop_index(op.f('ix_cmf_u_work_chat_group_executors_root_id'), table_name='cmf_u_work_chat_group_executors')
    op.drop_column('cmf_u_work_chat_group_executors', 'root_id')
    op.drop_index(op.f('ix_cmf_project_spectators_root_id'), table_name='cmf_project_spectators')
    op.drop_column('cmf_project_spectators', 'root_id')
    op.drop_index(op.f('ix_cmf_project_executors_root_id'), table_name='cmf_project_executors')
    op.drop_column('cmf_project_executors', 'root_id')
    op.drop_index(op.f('ix_cmf_person_group_rg_members_root_id'), table_name='cmf_person_group_rg_members')
    op.drop_column('cmf_person_group_rg_members', 'root_id')
    op.drop_index(op.f('ix_cmf_kanban_status_objects_root_id'), table_name='cmf_kanban_status_objects')
    op.drop_column('cmf_kanban_status_objects', 'root_id')
    op.drop_index(op.f('ix_cmf_document_spectators_root_id'), table_name='cmf_document_spectators')
    op.drop_column('cmf_document_spectators', 'root_id')
    op.drop_index(op.f('ix_cmf_document_related_objects_root_id'), table_name='cmf_document_related_objects')
    op.drop_column('cmf_document_related_objects', 'root_id')
    op.drop_index(op.f('ix_cmf_document_executors_root_id'), table_name='cmf_document_executors')
    op.drop_column('cmf_document_executors', 'root_id')
    # ### end Alembic commands ###
