Reputation: 7428
If I make a change to a model in django it no longer picks up changes with
python manage.py makemigrations
I did previously delete the database (postgres) via dropdb, and recreated it with createdb. I then deleted the migrations from the apps migrations folder. Before doing this makemigrations did work ok for that app.
What is the best way to fix?
Upvotes: 1
Views: 195
Reputation: 2569
Try this:
python manage.py makemigrations app_name
Or, just add __init__.py
file on each migrations folder.
Upvotes: 0
Reputation: 53649
Recreate the migrations folder with an __init__.py
file. A shortcut for this is to run python manage.py makemigrations <app_label>
. The app label here is important, otherwise it will treat your app as an unmigrated app and it won't create any migrations.
Upvotes: 3