title: How to fix Field defines a relation with the model 'auth.User', which has been swapped out
body: <p>I am trying to change my user model to a custom one. I do not mind dropping my database and just using a new one, but when I try it to run makemigrations i get this error</p>
  
  <pre><code>bookings.Session.session_client: (fields.E301) Field defines a relation with the model 'auth.User', which has been swapped out.
          HINT: Update the relation to point at 'settings.AUTH_USER_MODEL'.
  </code></pre>
  
  <p>booking/views.py</p>
  
  <pre><code>from django.shortcuts import render, get_object_or_404
  from django.http import HttpResponse, HttpResponseRedirect
  from bookings.models import Session
  from django.contrib.auth.decorators import login_required
  from django.contrib.auth.models import User
  
  # Create your views here.
  
  def book(request, Session_id):
      lesson = get_object_or_404(Session, pk=Session_id)
      try:
          client = request.user.id
      except (KeyError, Choice.DoesNotExist):
          return render(request, 'booking/details.html', {
              'lesson': lesson,
              'error_message': "You need to login first",
          })
      else:
          lesson.session_client.add(client)
           lesson.save()
       return HttpResponseRedirect("")
  </code></pre>
  
  <p>settings.py</p>
  
  <pre><code>INSTALLED_APPS = [
      #Custom apps
      'mainapp.apps.MainappConfig',
      'bookings.apps.BookingsConfig',
  
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
  ]
  
  AUTH_USER_MODEL = 'mainapp.CustomUser'
  </code></pre>
  
  <p>bookings/models.py</p>
  
  <pre><code>from django.db import models
  from django.contrib.auth.models import User
  
  # Create your models here.
  class Session(models.Model):
      session_title = models.CharField(max_length=300)
      session_time = models.DateTimeField("Time of session")
      session_difficulty = models.CharField(max_length=200)
      session_duration = models.IntegerField() 
      session_description = models.TextField()
      session_client = models.ManyToManyField(User, blank=True) 
  
      def __str__(self):
          return self.session_title   
  </code></pre>
  
  <p>I'm trying to change the user model to abstractuser.</p>