
# revision identifiers, used by Alembic.
revision = '32221e9f330c'
down_revision = '235b7b9989be'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.drop_constraint(
        'cycle_task_group_object_tasks_ibfk_4',
        table_name='cycle_task_group_object_tasks',
        type_='foreignkey'
        )
    op.drop_constraint(
        'cycle_task_group_objects_ibfk_4',
        table_name='cycle_task_group_objects',
        type_='foreignkey'
        )


def downgrade():
    pass


# revision identifiers, used by Alembic.
revision = '32221e9f330c'
down_revision = '235b7b9989be'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.drop_constraint(
        'uq_t_workflows', table_name='workflows', type_='unique')
    op.drop_constraint(
        'uq_t_task_groups', table_name='task_groups', type_='unique')
    op.drop_constraint(
        'cycle_task_group_object_tasks_ibfk_4',
        table_name='cycle_task_group_object_tasks',
        type_='foreignkey'
        )
    op.drop_constraint(
        'cycle_task_group_objects_ibfk_4',
        table_name='cycle_task_group_objects',
        type_='foreignkey'
        )


def downgrade():
    pass

Remove uniqueness constraints on Workflow and TaskGroup
Remove uniqueness constraints on Workflow and TaskGroup

* Titles need not be unique anymore

  
  # revision identifiers, used by Alembic.
  revision = '32221e9f330c'
  down_revision = '235b7b9989be'
  
  from alembic import op
  import sqlalchemy as sa
  
  
  def upgrade():
+     op.drop_constraint(
+         'uq_t_workflows', table_name='workflows', type_='unique')
+     op.drop_constraint(
+         'uq_t_task_groups', table_name='task_groups', type_='unique')
      op.drop_constraint(
          'cycle_task_group_object_tasks_ibfk_4',
          table_name='cycle_task_group_object_tasks',
          type_='foreignkey'
          )
      op.drop_constraint(
          'cycle_task_group_objects_ibfk_4',
          table_name='cycle_task_group_objects',
          type_='foreignkey'
          )
  
  
  def downgrade():
      pass
  
Remove uniqueness constraints on Workflow and TaskGroup
## Code Before:

# revision identifiers, used by Alembic.
revision = '32221e9f330c'
down_revision = '235b7b9989be'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.drop_constraint(
        'cycle_task_group_object_tasks_ibfk_4',
        table_name='cycle_task_group_object_tasks',
        type_='foreignkey'
        )
    op.drop_constraint(
        'cycle_task_group_objects_ibfk_4',
        table_name='cycle_task_group_objects',
        type_='foreignkey'
        )


def downgrade():
    pass

## Instruction:
Remove uniqueness constraints on Workflow and TaskGroup
## Code After:

# revision identifiers, used by Alembic.
revision = '32221e9f330c'
down_revision = '235b7b9989be'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.drop_constraint(
        'uq_t_workflows', table_name='workflows', type_='unique')
    op.drop_constraint(
        'uq_t_task_groups', table_name='task_groups', type_='unique')
    op.drop_constraint(
        'cycle_task_group_object_tasks_ibfk_4',
        table_name='cycle_task_group_object_tasks',
        type_='foreignkey'
        )
    op.drop_constraint(
        'cycle_task_group_objects_ibfk_4',
        table_name='cycle_task_group_objects',
        type_='foreignkey'
        )


def downgrade():
    pass
