Saturday, August 16, 2014

How to solve the djcelery's "DatabaseError: no such table: myapp.celery_taskmeta" error

When I executed a celery task in my django project (South installed), I got this error:

...
Programming Error ... DatabaseError: no such table: myapp.celery_taskmeta...
...

The problem here is actually that South manages the djcelery tables. So, I need to migrate djcelery to it's new schema

python manage.py migrate djcelery 0001 --fake
python manage.py migrate djcelery

python manage.py migrate djcelery 0002 --fake
python manage.py migrate djcelery

...

(try to do the fake migration until the error disappears. I had to do it 4 times (0004) in my case)


Reference: http://stackoverflow.com/questions/6959702/why-are-celery-taskmeta-and-other-tables-not-being-created-when-running-a-syncdb