python - Django NodeNotFoundError during migration -
the error when try runserver django app follows:
django.db.migrations.graph.nodenotfounderror: migration tasks.0001_initial dependencies reference nonexistent parent node (u'auth', u'0007_alter_validators_add_error_messages')
this happened after followed heroku tutorial: https://devcenter.heroku.com/articles/getting-started-with-django
i modified settings file include:
import dj_database_url secure_proxy_ssl_header = ('http_x_forwarded_proto', 'https') import os base_dir = os.path.dirname(os.path.abspath(__file__)) static_root = 'staticfiles' databases = { 'default': { 'engine': 'django.db.backends.sqlite3', 'name': os.path.join(base_dir, 'db.sqlite3'), } } #databases['default'] = dj_database_url.config() static_url = '/static/' staticfiles_dirs = ( os.path.join(base_dir, 'tasks/static'), ) my 0001_initial migration follows:
from __future__ import unicode_literals django.conf import settings django.db import migrations, models class migration(migrations.migration): dependencies = [ ('auth', '0007_alter_validators_add_error_messages'), migrations.swappable_dependency(settings.auth_user_model), ] i'm lost should try next fix error. advice appreciated! thank you!
your migration has dependency on migration in app () apparently doesn't exist. if you've removed or moved/consolidation migrations in 'auth' app, possibly why. if remove offending migration migration, make sure changes '0007' migration in auth package (check source code revision history) have been applied current database , should fine continue without explicit migration. consider checking if other apps in project depend on missing migrations 'auth'. cheers.
(u'auth', u'0007_alter_validators_add_error_messages')
Comments
Post a Comment