Skip to content

Commit

Permalink
Revert "Fixed #22183: Don't make a table for M2Ms with through="
Browse files Browse the repository at this point in the history
This reverts commit 1562b98.
  • Loading branch information
andrewgodwin committed Mar 6, 2014
1 parent 1562b98 commit 8ce3ea6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 1 addition & 2 deletions django/db/backends/schema.py
Expand Up @@ -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):
"""
Expand Down
2 changes: 0 additions & 2 deletions django/db/models/fields/related.py
Expand Up @@ -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
Expand Down

0 comments on commit 8ce3ea6

Please sign in to comment.