[Django]-Django does not create ImageField on Postgres

2👍

It looks like it was something messed with migrations, it’s not recommended to modify migration files manually. Django stores information which migrations were already applied, if you modify 0001 migration which is already applied and run migrate again those modifications won’t be applied. Of course I don’t know if this exactly what happened to you, but it looks like profile_picture field was added after 0001 was applied.

The easiest way to fix this (without rollbacking any migrations):

  1. remove field profile_picture from 0001 migration
  2. run makemigrations again (0002 with new field profile_picture should be created)
  3. run migrate
👤Kamil

Leave a comment