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.

Migrating ManyToManyField to null true, blank true, isn't recognized

I have made a model change from standard = models.ManyToManyField(Standard) to standard = models.ManyToManyField(Standard, blank=True, null=True) …

django django-models database-schema django-south django-migrations
Adding indexes to model fields in Django with migrations

I am trying to add indexes on model fields using Field.db_index for an app that has migrations. Looking …

django django-models django-admin django-migrations django-2.1
Django 1.8 migration unable to cast column id to integer

I'm migrating my site from an SQLite backend to a Postgres backend. We've been running native-Django style migrations (i.e., …

django postgresql django-migrations
Django 1.7.1 Makemigrations fails when using lambda as default for attribute

I'm using Django 1.7.1. My model looks like this: from datetime import datetime from django.db import models class myModel(models.…

django django-models lambda django-migrations
Django migrations using RunPython to commit changes

I want to alter a foreign key in one of my models that can currently have NULL values to not …

django django-migrations
Getting model ContentType in migration - Django 1.7

I have a data migration that updates some permissions. I know there are some known issues with permissions in migrations …

django django-1.7 django-migrations
Django: Best way to merge migrations conflicts

I'm currently working on a dev branch and I will need to merge it to master one day. I have …

python django django-migrations
How does django know which migrations have been run?

How does django know whether a migration has been applied yet? It usually gets it right, but when it doesn't …

python django database-migration django-migrations
How to fake migrations for not to create a specific existing intermediary table

I have following models class VucutBolgesi(models.Model): site = models.ForeignKey(Site) bolge = models.CharField(verbose_name="Bölge", max_…

django django-1.7 django-migrations