5👍
If you are adding initial migrations to an app, you must include the app name when using the makemigrations
command.
python manage.py makemigrations your_app_label
2👍
If it is the first time you are migrating that app you have to use:
manage.py makemigrations myappname
Once you do that you can do:
manage.py migrate
If you had your app in database, modified its model and its not updating the changes on makemigrations you probably havent migrated it yet.
Change your model back to its original form, run the first command (with the app name) and migrate…it will fake it. Once you do that put back the changes on your model, run makemigrations and migrate again and it should work.
- [Django]-Django MySql Fulltext search works but not on tests
- [Django]-Passing data into django forms
-3👍
I have sometimes the same problem.
I manage to populate the change in the database by following :
rm -rf your_app/migrations/*
python manage.py migrate
if it doesn’t work, consider a manual drop table before, if you don’t have data in it.
it worked for me with django 1.7c1