1

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.

e4c5
  • 52,766
  • 11
  • 101
  • 134
JasonTS
  • 2,479
  • 4
  • 32
  • 48
  • Check your DB status with python manage.py migrate --list http://stackoverflow.com/questions/29683494/what-should-i-use-instead-of-syncdb-in-django-1-9 – mtt2p May 14 '16 at 22:05
  • You do a copy of your Project and Need a fresh dB ? – mtt2p May 14 '16 at 22:09

1 Answers1

1

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.

e4c5
  • 52,766
  • 11
  • 101
  • 134