sql >> Base de Datos >  >> RDS >> PostgreSQL

django.db.utils.IntegrityError:la columna place_city contiene valores nulos

Parece que agregaste null=True después de crear el archivo de migración. Porque venue_city no es un campo anulable en su archivo de migración

Sigue estos pasos.

1) Drop venue_city & venue_country from your local table
3) Delete all the migration files you created for these `CharField to a ForeignKey` change
4) execute `python manage.py makemigrations`
5) execute 'python manage.py migrate'

Debería funcionar