title: Django makemigration breaks when model query is run in form - Why?
body: <p>I am using Django 3.2</p>
  <p>I want to populate a form select field as follows:</p>
  <pre><code>from .models import Post, BlogPostSubscriber, PostCategory
  
  # This causes makemigrations to break !!!
  # categories = [x for x in PostCategory.objects.all().order_by('slug').values_list('name', 'name')]
  
  categories = [('',''),]
  
  class PostForm(forms.ModelForm):
       
      class Meta:
          model = Post
          fields = ['category', 'title', 'content','tags']
  
          widgets = {
              'title': forms.TextInput(attrs={'class': 'form-control input'}),
              'category': forms.Select(choices=categories, attrs={'class': 'form-control input'}),
              'content': forms.Textarea(attrs={'class': 'form-control editable medium-editor-textarea'}),
              'tags': forms.TextInput(attrs={'class': 'form-control input'}),
          }
  </code></pre>
  <p>When I run <code>python manage.py makemigrations</code>, I get the following error:</p>
  <blockquote>
  <p>Relation blog_postcategory does not exist</p>
  </blockquote>
  <p>Why? and how do I fix this error?</p>