Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when migrate version 1.0.0 #22

Closed
camilonova opened this issue Jan 24, 2017 · 3 comments
Closed

Issue when migrate version 1.0.0 #22

camilonova opened this issue Jan 24, 2017 · 3 comments

Comments

@camilonova
Copy link

After upgrading I'm getting this error:

Traceback (most recent call last):
  File "manage.py", line 9, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 348, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/commands/showmigrations.py", line 36, in handle
    return self.show_list(connection, options['app_labels'])
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/commands/showmigrations.py", line 44, in show_list
    loader = MigrationLoader(connection, ignore_no_migrations=True)
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/loader.py", line 49, in __init__
    self.build_graph()
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/loader.py", line 293, in build_graph
    _reraise_missing_dependency(migration, parent, e)
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/loader.py", line 276, in _reraise_missing_dependency
    raise exc
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/loader.py", line 286, in build_graph
    self.graph.add_dependency(migration, key, parent)
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/graph.py", line 126, in add_dependency
    parent
django.db.migrations.exceptions.NodeNotFoundError: Migration social_django.0006_partial dependencies reference nonexistent parent node ('social_django', '0005_auto_20160727_2333')
@camilonova
Copy link
Author

I removed all tables manually an removed references at the django_migrations table to start from scratch and I'm getting this:

Traceback (most recent call last):
  File "manage.py", line 9, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 348, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/commands/showmigrations.py", line 36, in handle
    return self.show_list(connection, options['app_labels'])
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/commands/showmigrations.py", line 44, in show_list
    loader = MigrationLoader(connection, ignore_no_migrations=True)
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/loader.py", line 49, in __init__
    self.build_graph()
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/loader.py", line 293, in build_graph
    _reraise_missing_dependency(migration, parent, e)
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/loader.py", line 276, in _reraise_missing_dependency
    raise exc
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/loader.py", line 286, in build_graph
    self.graph.add_dependency(migration, key, parent)
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/graph.py", line 126, in add_dependency
    parent
django.db.migrations.exceptions.NodeNotFoundError: Migration social_django.0005_auto_20160727_2333 dependencies reference nonexistent parent node ('social_django', '0004_auto_20160423_0400')

@camilonova
Copy link
Author

This is related with #16 but here I'm starting from scratch.

@camilonova
Copy link
Author

I had to run this SQL query:

update django_migrations set app='social_django' where app='default';

This allowed me to run the migrations without any issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant