Get failed when want to deploy Django project

Hi,
On my local development it works perfect for make migration. When I want to deploy it it failes under process. What I read is it my category migration is failing on. I can’t understand why it fails when it working perfect locally with migration.
When I under fly.toml comment line than it deploy it.

release_command = 'python manage.py migrate --noinput'

Here is my log
Logs:

  INFO [fly api proxy] listening at /.fly/api
  2024/06/07 10:57:59 INFO SSH listening listen_address=[xxxxxxxxxxx]:22 dns_server=[fdaa::3]:53
  Machine created and started in 22.588s
  Traceback (most recent call last):
    File "/code/manage.py", line 22, in <module>
      main()
    File "/code/manage.py", line 18, in main
      execute_from_command_line(sys.argv)
    File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
      utility.execute()
    File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 412, in run_from_argv
      self.execute(*args, **cmd_options)
    File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute
      output = self.handle(*args, **options)
    File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 106, in wrapper
      res = handle_func(*args, **kwargs)
    File "/usr/local/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 117, in handle
      executor = MigrationExecutor(connection, self.migration_progress_callback)
    File "/usr/local/lib/python3.10/site-packages/django/db/migrations/executor.py", line 18, in __init__
      self.loader = MigrationLoader(self.connection)
    File "/usr/local/lib/python3.10/site-packages/django/db/migrations/loader.py", line 58, in __init__
      self.build_graph()
    File "/usr/local/lib/python3.10/site-packages/django/db/migrations/loader.py", line 276, in build_graph
      self.graph.validate_consistency()
    File "/usr/local/lib/python3.10/site-packages/django/db/migrations/graph.py", line 198, in validate_consistency
      [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
    File "/usr/local/lib/python3.10/site-packages/django/db/migrations/graph.py", line 198, in <listcomp>
      [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
    File "/usr/local/lib/python3.10/site-packages/django/db/migrations/graph.py", line 60, in raise_error
      raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
  django.db.migrations.exceptions.NodeNotFoundError: Migration blog.0002_post_categories_post_created_on_post_tags_and_more dependencies reference nonexistent parent node ('category', '0003_alter_category_id_alter_tag_id')
   INFO Main child exited normally with code: 1
   INFO Starting clean up.
   WARN could not unmount /rootfs: EINVAL: Invalid argument
  [    2.370557] reboot: Restarting system
  machine restart policy set to 'no', not restarting
-------
Checking DNS configuration for xxxxx.fly.dev
Error: release command failed - aborting deployment. error release_command machine 6e825d14bd4358 exited with non-zero status of 1

Found it by my self.
For others if they have same trouble.
My solution was

  1. Delete all created migrations Do not delete file init.py leave them
  2. found out that under .venv/lib/python3.10/site-packages/category/migrations Delete all migrtations files beside init.py
  3. run python manage.py makemigrations
  4. run python manage.py migrate