45 | | [https://github.com/wagtail/wagtail Wagtail] supports multiple database backends. We have a migration that adds a unique constraint to a foreign key with a condition. In addition, we also have migrations that alter the field referenced in the condition. Before making an alter field operation, we need to remove the unique constraint to avoid violating the constraint, then re-add the constraint after the field has been altered. We have more than one migrations that do these operations, thus triggering the error. This issue only happens on MySQL, specifically after the above commit was merged into Django. |
| 45 | [https://github.com/wagtail/wagtail Wagtail] supports multiple database backends. We have a migration that adds a unique constraint to a foreign key with a condition. In addition, we also have migrations that alter the field referenced in the condition. Before making an alter field operation, we need to remove the unique constraint to avoid violating the constraint, then re-add the constraint after the field has been altered. We have more than one migrations that do these operations, thus triggering the error. This issue only happens on MySQL, even specifically after the above commit was merged into Django. Even though conditional indexes aren't supported on MySQL, I believe it should just be ignored (as with previous releases) instead of crashing the schema editor. |