Skip to content

Django 5.1 Support - deprecated index_together #567

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

whoisearth
Copy link

Fix pulled from Django 4.2 release notes here -

https://docs.djangoproject.com/en/5.1/releases/4.2/#deprecated-features-4-2

Migrating existing index_together should be handled as a migration. For example:

class Author(models.Model):
    rank = models.IntegerField()
    name = models.CharField(max_length=30)

    class Meta:
        index_together = [["rank", "name"]]

Should become:

class Author(models.Model):
    rank = models.IntegerField()
    name = models.CharField(max_length=30)

    class Meta:
        indexes = [models.Index(fields=["rank", "name"])]

Django 5.1 ... index_together deprecated.
Django 5.1 .... index_together deprecated
@whoisearth whoisearth mentioned this pull request Jan 1, 2025
@raisoblast
Copy link

Waiting for this pull request to be merged soon

@blissdev
Copy link

blissdev commented May 9, 2025

Any updates on when this could be merged? @llazzaro

@cgossy
Copy link

cgossy commented May 14, 2025

Seems that @llazzaro is not responding. Or has anybody else infomation about new releases, maybe @jdufresne ?

@llazzaro
Copy link
Owner

I will try to take a look today

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

Successfully merging this pull request may close these issues.

5 participants