Reputation: 2589
I am trying to get a project from one machine to another. This project contains a massive log db table. It is too massive. So I exported and imported all db tables except this one via phpmyadmin.
No if I run the migrate command I expected django to create everything missing. But it is not.
How to make django check for and create missing db tables?
What am I missing, why is it not doing this? I feel like the old syncdb did the job. But the new --run-syncdb does not.
Thank you for your help.
Upvotes: 2
Views: 3124
Reputation: 53774
When you exported the data and re-imported it on the other database part of that package would have included the django_migrations
table. This is basically a log of all the migrations successfully executed by django.
Since you have left out only the log table according to you, that should really be the only table that's missing from your schema. Find the entries in django_migrations
that correspond to this table and delete them. Then run ./manage.py migrate
again and the table will be created.
Upvotes: 1