Commit 8ce3ea68 authored by Andrew Godwin's avatar Andrew Godwin
Browse files

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

This reverts commit 1562b989.
parent 1562b989
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -262,7 +262,6 @@ class BaseDatabaseSchemaEditor(object):
            })
        # 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)

    def delete_model(self, model):
+0 −2
Original line number Diff line number Diff line
@@ -2032,8 +2032,6 @@ class ManyToManyField(RelatedField):
            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