﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30105	Fix django test running ordering for partial unique constraint	Pavel Tyslacki	Pavel Tyslacki	"Bug come from #30062:

{{{
 ./tests/runtests.py migrations --parallel=1 --reverse --failfast
...
======================================================================
ERROR: test_create_model_with_partial_unique_constraint (migrations.test_operations.OperationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/home/tim/code/django/django/db/backends/utils.py"", line 84, in _execute
    return self.cursor.execute(sql, params)
  File ""/home/tim/code/django/django/db/backends/sqlite3/base.py"", line 376, in execute
    return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: index test_constraint_pony_pink_for_weight_gt_5_uniq already exists

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File ""/home/tim/code/django/tests/migrations/test_operations.py"", line 527, in test_create_model_with_partial_unique_constraint
    operation.database_forwards('test_crmo', editor, project_state, new_state)
  File ""/home/tim/code/django/django/db/backends/sqlite3/schema.py"", line 35, in __exit__
    super().__exit__(exc_type, exc_value, traceback)
  File ""/home/tim/code/django/django/db/backends/base/schema.py"", line 110, in __exit__
    self.execute(sql)
  File ""/home/tim/code/django/django/db/backends/base/schema.py"", line 137, in execute
    cursor.execute(sql, params)
  File ""/home/tim/code/django/django/db/backends/utils.py"", line 67, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File ""/home/tim/code/django/django/db/backends/utils.py"", line 76, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File ""/home/tim/code/django/django/db/backends/utils.py"", line 84, in _execute
    return self.cursor.execute(sql, params)
  File ""/home/tim/code/django/django/db/utils.py"", line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File ""/home/tim/code/django/django/db/backends/utils.py"", line 84, in _execute
    return self.cursor.execute(sql, params)
  File ""/home/tim/code/django/django/db/backends/sqlite3/base.py"", line 376, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: index test_constraint_pony_pink_for_weight_gt_5_uniq already exists

}}}
"	Uncategorized	assigned	Uncategorized	2.1	Normal				Unreviewed	1	0	0	0	0	0
