title: Strange behavior with a foreign key relationship and custom user model
body: <p>I am working on a django (1.8.6) site that involved two applications now.  One is a custom user model with basic registration / login / logout functionality, the second is a feedback application.  I want to have a foreign key relationship from a feedback to the user that submitted it.</p>
  
  <p>When I try to run ./manage.py migrate I get the following error.</p>
  
  <p>django.db.utils.ProgrammingError: relation "customauth_user" does not exist</p>
  
  <p>This is of course since the database table does not YET exist.  If I remove the related field, everything works fine.  Here is my code.</p>
  
  <p>My user model:</p>
  
  <pre><code>class User(AbstractBaseUser):
  
  username = models.CharField(_('username'), max_length=100, unique=True)
  email = models.EmailField(('email address'), max_length=254)
  first_name = models.CharField(_('first name'), max_length=50)
  last_name = models.CharField(_('lat_name'), max_length=50)
  receive_newsletter = models.BooleanField(_('receive_newsletter'), default=False)
  referral_id = models.CharField(_('referral id'), max_length=40)
  
  
  USERNAME_FIELD = 'username'
  REQUIRED_FIELDS = ['email', 'first_name', 'last_name']
  </code></pre>
  
  <p>And the model from my feedback form:</p>
  
  <pre><code>class Feedback(models.Model):
  timestamp = models.DateTimeField(auto_now_add=True)
  submitted_by = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='feedback')
  title = models.CharField(max_length=100)
  message = models.CharField('Users message', max_length=1024)
  reviewed = models.BooleanField('Reviewed by staff', default='NEW', choices=FEEDBACK_STATUS_CHOICES, max_length=10)
  jira_ticket_created = models.BooleanField('Created a Jira ticket to track this feedback.',
                                            default=False)
  jira_ticket_number = models.CharField(max_length=10, blank=True, null=True)
  
  class Meta:
      db_table = 'feedback'
  
  def __str__(self):
      return str(self.timestamp) + ' ' + self.title
  </code></pre>
  
  <p>I have configured my user model in settings, added both applications, and in my installed applications my applcaition with my custom user model is first.</p>
  
  <p>Any thoughts?</p>
  
  <p>Thanks
  Craig</p>