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.

Default value for foreign key in Django migrations.AddField

Using migrations, I need to add a new field (a foreign key) to a model. I know it can be …

django foreign-keys default django-migrations
Getting a "The following content types are stale and need to be deleted" when trying to do a migrate. What does this mean, and how can I solve it?

This is my models.py: class Notification(models.Model): user = models.ForeignKey(User) createdAt = models.DateTimeField(auto_now_add=True, …

django django-models django-migrations django-contenttypes
Django 1.8 migrate: django_content_type does not exist

I just upgraded my django from 1.7.1 to 1.8.4. I tried to run python manage.py migrate but I got this error: …

django python-2.7 django-1.7 django-migrations django-1.8
Django: "Unknown Column" when run makemigrations on an app after adding an Integer Field

First of all, I have recently upgraded from Django 1.6 to 1.8, and never used South, so I'm new to migrations. I …

mysql django python-2.7 django-migrations django-managers
Add non-null and unique field with already populated model

I have one model in my app running in a server with a few entries. I need to add a …

django django-1.7 django-migrations
Is it safe to rename Django migrations file?

Since Django 1.8 the makemigrations command has a --name, -n option to specify custom name for the created migrations file. I'd …

django django-migrations
Django makemigrations not detecting project/apps/myapp

Solved Interesting: ./manage.py makemigrations apps.myapp -> "App 'apps.myapp' could not be found. Is it in INSTALLED_…

django django-models django-migrations
Trying to make a PostgreSQL field with a list of foreign keys in Django

Here is what I'm trying to do: Make a model in Django that is a PostgreSQL array (database specific type), …

django postgresql django-models django-orm django-migrations
django.db.migrations.exceptions.CircularDependencyError

I have a problem with Django migrations on empty DB. When I want to migrate I have a circular dependency …

python django django-migrations django-database
Adding django admin permissions in a migration: Permission matching query does not exist

I wanted to add some groups and assign permissions to them in a manually written migration but if I run …

django django-migrations django-permissions