Answer the question
In order to leave comments, you need to log in
Why don't django migrations work?
Added model, completed manage.py makemigrations shop
, received
Migrations for 'shop':
0001_initial.py:
- Create model Product
- Create model ShopDirectory
- Add field category to product
manage.py migrate
I receiveOperations to perform:
Synchronize unmigrated apps: ...
Apply all migrations: shop...
Synchronizing apps without migrations:
Creating tables...
Installing custom SQL...
Installing indexes...
Running migrations:
No migrations to apply.
Answer the question
In order to leave comments, you need to log in
Probably the migration has already passed. Models are definitely not created in the database?
There should be a table in the database called django_migrations (there is exactly migrations in the title). All migrations that were accepted in this database are marked there. Check if it's already accepted.
ps If a person does "makemigrations" then he has Django=>1.7
Agree with RGV , connect to the database and see if the tables with the shop_ prefix are created, if there is a record of the migration in the django_migrations table.
Try django south, but it's not up to date for the latest version of django.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question