Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@collinanderson
Created January 21, 2015 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save collinanderson/c65f180f1126fde2f951 to your computer and use it in GitHub Desktop.
Save collinanderson/c65f180f1126fde2f951 to your computer and use it in GitHub Desktop.
$ manage.py migrate contenttypes
Operations to perform:
Apply all migrations: contenttypes
Running migrations:
No migrations to apply.
Your models have changes that are not yet reflected in a migration, and so won't be applied.
Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
Traceback (most recent call last):
File "/opt/oneten/ccw/proj/comcenter/manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/opt/oneten/ccw/virtenv/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/opt/oneten/ccw/virtenv/lib/python2.7/site-packages/django/core/management/__init__.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/oneten/ccw/virtenv/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "/opt/oneten/ccw/virtenv/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute
output = self.handle(*args, **options)
File "/opt/oneten/ccw/virtenv/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 165, in handle
emit_post_migrate_signal(created_models, self.verbosity, self.interactive, connection.alias)
File "/opt/oneten/ccw/virtenv/lib/python2.7/site-packages/django/core/management/sql.py", line 268, in emit_post_migrate_signal
using=db)
File "/opt/oneten/ccw/virtenv/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 198, in send
response = receiver(signal=self, sender=sender, **named)
File "/opt/oneten/ccw/virtenv/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py", line 83, in create_permissions
ctype = ContentType.objects.db_manager(using).get_for_model(klass)
File "/opt/oneten/ccw/virtenv/lib/python2.7/site-packages/django/contrib/contenttypes/models.py", line 58, in get_for_model
" is migrated before trying to migrate apps individually."
RuntimeError: Error creating new content types. Please make sure contenttypes is migrated before trying to migrate apps individually.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment