title: django.db.utils.ProgrammingError: relation "auth_group" does not exist
body: <p>I have a django project that has been under development but hadn't been tested yet. Recently I have been running the test command python manage.py test but I get the following error. </p>
  
  <pre><code>psycopg2.ProgrammingError: relation "auth_group" does not exist
  
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "manage.py", line 22, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
      utility.execute()
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/core/management/commands/test.py", line 26, in run_from_argv
      super().run_from_argv(argv)
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
      self.execute(*args, **cmd_options)
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
      output = self.handle(*args, **options)
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/core/management/commands/test.py", line 56, in handle
      failures = test_runner.run_tests(test_labels)
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/test/runner.py", line 604, in run_tests
      old_config = self.setup_databases()
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/test/runner.py", line 551, in setup_databases
      self.parallel, **kwargs
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/test/utils.py", line 174, in setup_databases
      serialize=connection.settings_dict.get('TEST', {}).get('SERIALIZE', True),
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/db/backends/base/creation.py", line 68, in create_test_db
      run_syncdb=True,
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/core/management/__init__.py", line 148, in call_command
      return command.execute(*args, **defaults)
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
      output = self.handle(*args, **options)
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/core/management/base.py", line 83, in wrapped
      res = handle_func(*args, **kwargs)
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 172, in handle
      self.sync_apps(connection, executor.loader.unmigrated_apps)
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 310, in sync_apps
      self.stdout.write("    Running deferred SQL...\n")
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/db/backends/base/schema.py", line 106, in __exit__
      self.execute(sql)
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/db/backends/base/schema.py", line 133, in execute
      cursor.execute(sql, params)
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/raven/contrib/django/client.py", line 127, in execute
      return real_execute(self, sql, params)
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/db/backends/utils.py", line 68, in execute
      return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
      return executor(sql, params, many, context)
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/db/backends/utils.py", line 86, in _execute
      return self.cursor.execute(sql, params)
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/db/utils.py", line 89, in __exit__
      raise dj_exc_value.with_traceback(traceback) from exc_value
    File "/home/ubuntu/Desktop/env/lib/python3.6/site-packages/django/db/backends/utils.py", line 86, in _execute
      return self.cursor.execute(sql, params)
  django.db.utils.ProgrammingError: relation "auth_group" does not exist
  </code></pre>
  
  <p>And the following is my settings file:</p>
  
  <pre><code>LOCAL_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sites',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'django.contrib.postgres',
  ]
  
  INSTALLED_APPS = [
      # 'cachalot',
      'celery',
      'corsheaders',
      'django_countries',
      'django_filters',
      'generic_relations',
      'django_celery_beat',
      'haystack',
      'silk',
      'raven.contrib.django.raven_compat',
      'rest_framework_filters',
      'rest_framework',
      'rest_framework_jwt',
      'rest_framework_cache',
      'rolepermissions',
      'storages',
  ]
  </code></pre>
  
  <p>I have been guessing it has to do with django.contrib.auth but I cannot find the cause of the error or even where to create the table before start of test.
  What could be the cause? </p>