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.

Rerun a Django data migration

How would I rerun a data migration on Django 1.8+? If relevant, my migration is numbered 0011_my_data_migration.py and …

django django-migrations
django.core.exceptions.FieldDoesNotExist: model has no field named <function SET_NULL at 0x7fc5ae8836e0>

After some googling and only finding a dead-end topic, I'm still stuck on a migration problem. My model : class CurationArticle(…

python django django-migrations
How do I execute raw SQL in a django migration

I am aware of the cursor object in Django. Is there any other preferred way to execute raw SQL in …

django postgresql database-partitioning django-migrations
Migrating from django user model to a custom user model

I am following these two references (one and two) to have a custom user model in order to authenticate via …

django django-migrations
How to define default data for Django Models?

I want my application to have default data such as user types. What's the most efficient way to manage default …

django django-models django-orm django-migrations
Django 1.7 - App 'your_app_name' does not have migrations

I am trying to upgrade from Django 1.6.7 to Django 1.7.1, so I have been trying to migrate my app. I have …

python django upgrade django-migrations
Django Heroku Error "Your models have changes that are not yet reflected in a migration"

I recently added a model to my app (UserProfile) and when I pushed the changes to Heroku, I think I …

python django heroku django-1.7 django-migrations
How to merge consecutive database migrations in django 1.9+?

Migrations allow transforming from one database schema to another while maintaining current data in the database. Django allows creating migrations …

django django-migrations
Django migrations RunPython not able to call model methods

I'm creating a data migration using the RunPython method. However when I try to run a method on the object …

django django-models django-migrations
django.db.utils.IntegrityError: column "venue_city" contains null values

I have read a lot of other posts here on stackoverflow and google but I could not find a solution. …

sql django postgresql django-models django-migrations