Top "Django-migrations" questions

Django migrations are a way to apply changes to a database previously created, introduced in Django 1.7. This tool is used when a model is modified (adding a field, deleting a model, etc.

--fake-initial vs --fake in Django migration?

What is the difference between --fake-initial and --fake in Django migrations? What are the dangers of using fake migrations? Anybody …

django django-models django-orm django-migrations
Django migration with uuid field generates duplicated values

I have a uuid field (not a primary key). The generated migration is: from __future__ import unicode_literals from django.…

python django uuid django-migrations
Fix Conflicting migrations detected in Django1.9

I updated django-dynamic-model repository to support Django 1.9. I got this error: CommandError: Conflicting migrations detected; multiple leaf nodes in the …

python django django-models django-migrations
InvalidBasesError: Cannot resolve bases for [<ModelState: 'users.GroupProxy'>]

When I run tests I get this error during database initialization: django.db.migrations.state.InvalidBasesError: Cannot resolve bases for [&…

python django unit-testing django-models django-migrations
Django data migration when changing a field to ManyToMany

I have a Django application in which I want to change a field from a ForeignKey to a ManyToManyField. I …

django django-models django-migrations
Django migrations with multiple databases

I have a hard time with creating data migrations. I use two databases for my apps. I configured databases in …

django django-migrations
Django datetime default value in migrations

I've read some questions about this issue in so, also this question is not giving the correct answer for my …

python mysql django django-migrations
ValueError in Django when running the "python manage.py migrate" command

I needed to add more fields to Django's User model, so I created a custom model class (named Accounts in …

django django-models django-migrations django-users
Received "ValueError: Found wrong number (0) of constraints for ..." during Django migration

While using Django 1.7 migrations, I came across a migration that worked in development, but not in production: ValueError: Found wrong …

django django-migrations
Django backup strategy with dumpdata and migrations

As in this question, I set up a dumpdata-based backup system for my database. The setup is akin to running …

python django backup django-migrations dumpdata