Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update index_together fields in migrations #2510

Open
tienne-B opened this issue Oct 14, 2024 · 0 comments
Open

Update index_together fields in migrations #2510

tienne-B opened this issue Oct 14, 2024 · 0 comments

Comments

@tienne-B
Copy link
Member

Migrations will fail when updating Django to 5.1 as the index_together model meta attribute has been removed, from both the models (these have already been changed), but also in the migrations. We should go through old migrations and update (or remove) instances that use index_together in a step.

If an index is already present as a unique_together, the step can be removed. Otherwise, an AddIndex operation should be added (or similar). We should not squash migrations.

https://docs.djangoproject.com/en/5.1/releases/4.2/#index-together-option-is-deprecated-in-favor-of-indexes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant