title: django.db.migrations.exceptions.NodeNotFoundError: Migration accounts.0001_initial dependencies reference nonexistent parent node
body: <p>I'm trying to deploy my project on heroku ,i'm using django 3.1 and i'm unable to do that. I'm getting error due to migrations. Please i humble request you to give some time to this question to resolve this problem. Whenever i run the command <strong>heroku run python manage.py migrate</strong> ,it gives following traceback.</p>
  <pre><code>Traceback (most recent call last):
    File &quot;manage.py&quot;, line 22, in &lt;module&gt;
      main()
    File &quot;manage.py&quot;, line 18, in main
      execute_from_command_line(sys.argv)
    File &quot;/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py&quot;, line 401, in execute_from_command_line
      utility.execute()
    File &quot;/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py&quot;, line 395, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File &quot;/app/.heroku/python/lib/python3.6/site-packages/django/core/management/base.py&quot;, line 330, in run_from_argv
      self.execute(*args, **cmd_options)
    File &quot;/app/.heroku/python/lib/python3.6/site-packages/django/core/management/base.py&quot;, line 371, in execute
      output = self.handle(*args, **options)
    File &quot;/app/.heroku/python/lib/python3.6/site-packages/django/core/management/base.py&quot;, line 85, in wrapped
      res = handle_func(*args, **kwargs)
    File &quot;/app/.heroku/python/lib/python3.6/site-packages/django/core/management/commands/migrate.py&quot;, line 92, in handle
      executor = MigrationExecutor(connection, self.migration_progress_callback)
    File &quot;/app/.heroku/python/lib/python3.6/site-packages/django/db/migrations/executor.py&quot;, line 18, in __init__
      self.loader = MigrationLoader(self.connection)
    File &quot;/app/.heroku/python/lib/python3.6/site-packages/django/db/migrations/loader.py&quot;, line 53, in __init__
      self.build_graph()
    File &quot;/app/.heroku/python/lib/python3.6/site-packages/django/db/migrations/loader.py&quot;, line 255, in build_graph
      self.graph.validate_consistency()
    File &quot;/app/.heroku/python/lib/python3.6/site-packages/django/db/migrations/graph.py&quot;, line 195, in validate_consistency
      [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
    File &quot;/app/.heroku/python/lib/python3.6/site-packages/django/db/migrations/graph.py&quot;, line 195, in &lt;listcomp&gt;
      [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
    File &quot;/app/.heroku/python/lib/python3.6/site-packages/django/db/migrations/graph.py&quot;, line 58, in raise_error
      raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
  django.db.migrations.exceptions.NodeNotFoundError: Migration accounts.0001_initial dependencies reference nonexistent parent node ('auth', '0023_remove_user_current_balance')
  </code></pre>
  <p>migration dependency</p>
  <pre><code> dependencies = [
          ('auth', '0023_remove_user_current_balance'),
      ]
  </code></pre>
  <p>account.model</p>
  <pre><code>GENDER_CHOICES = (
      ('male','Male'),
      ('female','Female'),
      )
  class User(auth.models.AbstractUser):
      
      current_balance = models.IntegerField((&quot;user balance&quot;),default=0, blank=True, null=True)
      age = models.IntegerField((&quot;age&quot;),blank=True, null=True)
      gender = models.CharField((&quot;gender&quot;), max_length=50,choices=GENDER_CHOICES,null=True)
      nationality = models.CharField((&quot;nationality&quot;), max_length=50,null=True)
  
      def __str__(self):
          return &quot;@{}&quot;.format(self.username)
  </code></pre>
  <p>When i tried to comment out the dependency , Then it returned me : <strong>raise ValueError('Related model %r cannot be resolved' % self.remote_field.model)ValueError: Related model 'auth.Group' cannot be resolved</strong></p>
  <p>if more code is require then tell me in a comment section thank you.</p>