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

Refs #27236 -- Fixed references to index_together in historical migrations. #18818

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

charettes
Copy link
Member

Trac ticket number

Follow up to this forum discussion about the broken guarantee that

AlterIndexTogether is officially supported only for pre-Django 4.2 migration files. For backward compatibility reasons, it’s still part of the public API, and there’s no plan to deprecate or remove it, but it should not be used for new migrations. Use AddIndex and RemoveIndex operations instead.

I'm still not convinced this is the appropriate solution and I suspect parts of 2abf417 should be reverted to continue to support the initially suggested deprecation path.

…rom_model.

It's not possible for ModelMeta.index_together to exist anymore.
…tions.

While AlterUniqueTogether has been documented to be still allowed in historical
migrations for the foreseeable future it has been crashing since 2abf417
was merged because the latter removed support for Meta.index_together which the
migration framework uses to render models to perform schema changes.

CreateModel(options["unique_together"]) was also affected.
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.

1 participant