Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "Fixed #22183: Don't make a table for M2Ms with through="

This reverts commit 1562b98.
  • Loading branch information...
commit 8ce3ea687cfae0bc47fcf023cb1f523dae4664ef 1 parent 1562b98
@andrewgodwin andrewgodwin authored
View
3  django/db/backends/schema.py
@@ -262,8 +262,7 @@ def create_model(self, model):
})
# Make M2M tables
for field in model._meta.local_many_to_many:
- if field.rel.through._meta.auto_created:
- self.create_model(field.rel.through)
+ self.create_model(field.rel.through)
def delete_model(self, model):
"""
View
2  django/db/models/fields/related.py
@@ -2032,8 +2032,6 @@ def deconstruct(self):
kwargs['to'] = self.rel.to
else:
kwargs['to'] = "%s.%s" % (self.rel.to._meta.app_label, self.rel.to._meta.object_name)
- if getattr(self.rel, 'through', None) is not None:
- kwargs['through'] = self.rel.through
# If swappable is True, then see if we're actually pointing to the target
# of a swap.
swappable_setting = self.swappable_setting

0 comments on commit 8ce3ea6

Please sign in to comment.
Something went wrong with that request. Please try again.